Attached accelerator based inference service

ABSTRACT

Implementations detailed herein include description of a computer-implemented method. In an implementation, the method at least includes receiving an application instance configuration, an application of the application instance to utilize a portion of an attached accelerator during execution of a machine learning model and the application instance configuration including: an indication of the central processing unit (CPU) capability to be used, an arithmetic precision of the machine learning model to be used, an indication of the accelerator capability to be used, a storage location of the application, and an indication of an amount of random access memory to use.

BACKGROUND

As deep learning becomes more prevalent across a range of applications,customers find it challenging and expensive to run in production. Today,customers use GPUs to improve the performance and efficiency of runninginterference workloads but find it difficult to do so withoutoverprovisioning capacity, which can be wasteful and expensive. The costof running deep learning inference makes up a significant portion of theoverall application infrastructure, and any inefficiency in runningthese workloads at scale can be cost prohibitive.

BRIEF DESCRIPTION OF DRAWINGS

Various embodiments in accordance with the present disclosure will bedescribed with reference to the drawings, in which:

FIG. 1 illustrates embodiments of a system utilizing an elasticinference service.

FIG. 2 illustrates embodiments of an elastic inference service.

FIG. 3 illustrates embodiments of a system that allows for elasticinference including data plane aspects and control plane aspects.

FIG. 4 illustrates examples of method of appliance provisioning as aswim lane diagram.

FIG. 5 illustrates an embodiment of accelerator appliance provisioning.

FIG. 6 illustrates an embodiment of accelerator appliancepre-attachment.

FIG. 7 illustrates examples of method of appliance attaching as a swimlane diagram.

FIG. 8 illustrates an embodiment of accelerator appliance attachment.

FIG. 9 illustrates examples of method of appliancede-attaching/recycling as a swim lane diagram.

FIG. 10 illustrates embodiments of a swim diagram of a method of usingan accelerator for elastic inference including interactions betweenapplication instance and an accelerator appliance.

FIG. 11 illustrates embodiments of a method performed by a web servicesprovider in implementing an elastic inference service.

FIG. 12 illustrates embodiments of a method performed by a web servicesprovider in implementing an elastic inference service.

FIG. 13 illustrates embodiments of a method performed by a web servicesprovider in implementing an elastic inference service.

FIG. 14 illustrates embodiments of a systems using an accelerator-basedinference service.

FIG. 15 illustrates an example provider network environment according tosome embodiments.

FIG. 16 illustrates an example data center that implements an overlaynetwork on a network substrate using IP tunneling technology accordingto some embodiments.

FIG. 17 illustrates an example provider network that provides virtualnetworks on the provider network to at least some customers according tosome embodiments.

FIG. 18 is a block diagram illustrating an example computer system thatmay be used in some embodiments.

FIG. 19 illustrates a logical arrangement of a set of general componentsof an exemplary computing device that can be utilized in accordance withvarious embodiments.

FIG. 20 illustrates an example of an environment for implementingaspects in accordance with various embodiments.

DETAILED DESCRIPTION

Various embodiments of methods, apparatus, systems, and non-transitorycomputer-readable storage media for an elastic machine learning serviceare described. In particular, a slot of an accelerator may be attachedto an inference application (an application that includes an inferencecall) and used as a part of a pipeline of a larger application.

An elastic machine learning/inference (EI) service provides costefficient hardware acceleration for applications running on a computeinstance. The attachment and use are elastic in that an accelerator canbe added or removed and with a plurality of choices of precision and/orspeed. As such, developers can incorporate hardware acceleration in moreplaces without using a full accelerator (such as an entire graphicsprocessing unit (GPU)). Further, the EI service obscures the underlyinghardware through a hardware-independent interface, allowing the serviceprovider to deploy heterogeneous hardware underneath, depending on costand capabilities, and adjust to the quickly moving deeplearning/artificial intelligence hardware landscape. Further, through anEI interface (the attachment of an accelerator slot and/or commands thatallow communication between an accelerator slot and an application), asingle accelerator chip can be virtualized across multiple inferencingapplications (such as customer instances).

As different machine learning workloads have different amounts of pre-and post-processing requirements outside of the core machine learning(ML) function, and the amount of CPU, DRAM, and hardware accelerationresources needed is not the same for each workload. The decoupling ofhardware resources needed for machine learning computation efficiencyand acceleration provided by the described EI service allows thedeveloper to size the central processing unit (CPU) and memory (such asdynamic random-access memory (DRAM)) independently in a computeinstance.

FIG. 1 illustrates embodiments of a system utilizing an elasticinference service. In the illustration, the elastic inference service105 is a service provided by a web services provider 101. The webservices provider 101 provides multi-tenant compute and/or storagecapabilities.

In some embodiments, a front end 103 of the web services provider 101 isa conduit through which users (such as customers) of the web servicesprovider 101 interact with underlying services of the web servicesprovider 101. For example, a user device 121 interacts with the elasticinference service 105 through the front end 103. This interaction mayinclude the configuration of the elastic inference service 105 andreceiving results from the elastic inference service 105. Interactionmay be through the use of application programming interface (API) callsand/or a command line interface. In some embodiments, there is a directcoupling to the elastic inference service 105. API calls toDescribeElasticlnferenceAccelerators; RunInstances; StartInstances; etc.are utilized in some embodiments.

The elastic inference service 105 manages a pool of acceleratorappliances running a specific set of software components to deliver anaccelerator. The elastic inference 105 is utilized to execute anapplication that includes at least some portion of code (such as amodel) to be executed on an accelerator. These accelerator appliancesreside in a service owned virtual network. Internally, an acceleratormaps to an accelerator slot, which comprises a fraction of computeresources from the accelerator appliance. An accelerator appliance mayhost accelerators comprising a plurality of accelerator slots. Thenumber of accelerators slots being hosted on an accelerator appliancedepends on the configuration of the accelerator and the configuration ofthe accelerator appliance.

Users may launch an application instance and request an accelerator tobe attached according to a user provided configuration (examples aredetailed herein). A control plane of the elastic inference service 105handles the request to provision at least one accelerator slot andattach one or more slots to the user's application instance. Theconfiguration may dictate particulars of the accelerator slot(s) to use,or the elastic inference service 105 may do so. After the attachment,the accelerator slot(s) is/are accessible from a user's virtual networkor via a more direct connection (such as a PCIe connection).

The elastic inference service 105, as noted above, supportsmulti-tenancy acceleration for machine learning tasks such as inference.Storage 113A and/or 113B is used to store one or more applicationsincluding one or more models to be executed on the elastic inferenceservice 105. Applications may be hosted by the elastic inference service105 as containers or a run as a part of a virtual machine.

Data source(s) 109A and 109B provide scoring data to be processed by theaccelerator run by the elastic inference service 105.

In some embodiments, the elastic inference service 105 is on a userdevice such as user device 121 and not a part of a web services provider101 offering, however, in the interest of brevity, most of thediscussion below uses a web services provider as the example.

The numbered circles illustrate an exemplary flow. At circle 1, a userdevice 121 communicates to the web services provider 101 a configurationof the elastic inference service 105. In particular, the user device 121configures the elastic inference service 105 to host an application fromstorage 113A that includes a model to run on an accelerator that iscontrolled by the elastic inference service 105.

At circle 2, this configuration is provided to the elastic inferenceservice 105 which connects to the storage 113A at circle 3 to access andload the model and determine if it can be run on an accelerator of theelastic inference service 105. In some embodiments, the elasticinference service 105 also determines how the accelerator should run themodel.

At circles 4A or 4B, a data source 109A or 109B provides scoring data tothe front end 103. This scoring data is forwarded to the elasticinference service 105 for processing and a result is provided back tothe front end 103 at circle 5. The result may also be stored in storage113A or 113B. Finally, the result is provided to the user device 121 (ifrequested).

FIG. 2 illustrates embodiments of an elastic inference service 105. Thisan elastic inference service 105 may be a part of a web servicesprovider offering, or as an engine on a user device (however, in theinterest of brevity as noted above, “service” will be used throughoutthe application). In particular, what is shown could be considered thedata plane of the elastic inference service 105. As shown, the dataplane comprises a client component (portion of application instance 211)and a server component (accelerator appliance 221). The client componentis delivered as client library implementation installed on theapplication instance 211. The client library forwards inference callsfrom the application instance 211 to the remotely attached acceleratorappliance 221. In some embodiments, the accelerator appliance 221receives a tensor from the application instance 211 and returns atensor.

An application instance 211 is a virtual computing environment that usesa particular configuration of CPU 212, memory, storage, and networkingcapacity that is to execute an application 213. In some embodiments, theconfiguration is called an instance type. A template for an applicationinstance (including an operating system) is called a machine image. Theapplication 213 may be called “inference application” below to highlightthat a part of the application 213 makes inference calls to at least oneaccelerator slot. However, the application 213 typically includes othercode and the inference call is usually one aspect of an applicationpipeline.

The instance type that is specified by a user determines the hardware ofthe host computer to be used for the instance within the web servicesprovider 101. Each instance type offers different compute, memory, andstorage capabilities and are grouped in instance families based on thesecapabilities.

Similarly, an accelerator appliance 221 (another compute instance) usesa particular configuration of CPU 224, memory, storage, and networkingcapacity that is to execute a machine learning model of application 213.The accelerator appliance 221 additionally has access to one or moreaccelerators 222. Each accelerator 222 is comprised of one or moreaccelerator slots 223. In particular, the compute resources of theaccelerator appliance 221 are partitioned, allocated, resource governedand isolated across accelerator slots 223 for consistent, sustainedperformance in a multi-tenant environment. Code executing on the CPU 224orchestrates the on-board accelerators, runs an inference engineruntime, and offloads computation to the accelerators 222. The resourcesof an accelerator appliance 221 that could come under contention includethe CPU 224, memory, accelerator, accelerator memory, communicationchannel 281 (such as a direct connection like PCIe or a networkedconnection), disk, and host-to-interconnect (such as PCIe) bandwidth. Anaccelerator slot 223 handle the application instance's 211 calls.

Resource governance and isolation may reduce/mitigate interference ofrequests across accelerator slots 223 through static partitioning ofresources across accelerator slots 223 using appliance managementcomponents 241. Static partitioning is typically used for the followingresource types on an accelerator appliance 221 of CPU cores and memory,accelerator compute and memory, and network bandwidth (at leastingress). However, in some embodiments, dynamic partitioning is utilizedsuch that non-attached slots 223 do not have resources such as memoryallocated.

In some embodiments, the CPU 224 resources and disk may be isolated andgoverned using control groups (cgroups), accelerator resources may beisolated and governed using multi-process service functionality, andnetwork bandwidth may be isolated and governed (such as throttled) usingone or more network schedulers. For example, in some embodiments, CPUcores are partitioned across processes using a cpuset mechanism inCgroups. A small set of cores is shared across themanager/maintenance/health check/logging processes (which are either peraccelerator or common to the instance). The remaining portion of thecores are partitioned across the accelerator slots.

For accelerator resources 222, the partitioning of the accelerator slots223 is dependent on the type of underlying accelerator used. Forexample, in some embodiments, spatial multiplexing of kernels ontoaccelerator slots is used. For a given accelerator slot 223, kernels usea fraction of the hardware available. One way to do this is to make thefraction proportional to the Tera operations/sec. (TOPS) capacity of anaccelerator slot 223. For a systolic array-based accelerator temporalmultiplexing is used to slot a single tensor processing block, withsupport for pre-empting long running kernels.

A remotely attached accelerator slot 223 is presented to a user as anelastic inference accelerator, an ephemeral device that is attached tothe customers application instance 211 on instance launch to provideinference accelerator capabilities to the instance. Users may associateone or more elastic inference accelerators with an application instance.

For communication channel 281 bandwidth usage, a concern is with ingressbandwidth as large tensors may be sent as input for inference calls(e.g., vision models). Each of n ingress branches should use roughly 1/nof the instance bandwidth (even when all n branch network interfaces arenot active). Network schedulers (not shown) on accelerator appliance 221may be used. Communication between an application instance 211 and anaccelerator 221 happens on multiple network connections with eachconnection being initiated by an application instance 211.

The compute capacity of EI for inference can be scaled up and down indifferent ways. First, the customer instance and EI attachment can bethe auto-scaling unit, as EI attachment is part of launch instancetemplate. Second, the customer can attach multiple EI interfaces, ofdifferent precision and TOPS, to a given instance and distributeinference calls across them.

For many networks, inference can be performed using 8-bit integer (INT8)computations without significant impact on accuracy. In the real world,input data is often generated with low precision (or, low dynamicrange), hence computation at lower precision does not impact theaccuracy of the results. Using low-precision computation allowsinference to reduce memory usage, transfer data at higher throughput,deploy larger models, and increase OPS throughput via wide vectorinstructions. However, training often uses higher precision arithmetic(e.g., FP32) to produce a model that uses high-precision weights. Hence,we need to deal with this gap in precision between the trained model(e.g., FP32) and the capabilities/mode of operation of hardware forinference (e.g., INT8).

In some embodiments, the precision capability of the hardware is exposedto the user and the user is to provide the model in the respectiveprecision. In other embodiments, a conversion from higher precisiontrained model (FP32) to lower precision inference model is performed. Tocarry out the quantization in an efficient manner using pre-computedmin/max bounds for input tensor/activation/weights, a calibrationdataset from the user for that model may be used.

The elastic inference service offers at least two arithmetic precisionsof FP32 and FP16. In both cases, in some embodiments, a trained model isprovided in FP32 format. Running inference in FP16 mode for FP32 modelinvolves simple type conversion (not quantization).

FIG. 3 illustrates embodiments of a system that allows for elasticinference including data plane aspects and control plane aspects. Insome embodiments, the aspects of this system are a part of an elasticinference service. As noted above, a remotely attached accelerator 223is presented as an elastic inference accelerator (EIA) (or simplyaccelerator) attached to the user's compute instance. The user's computeinstance is labeled as an application instance (AI) 211 and the computeinstance which hosts the EIA on the service side is labeled acceleratorappliance (AA) 221. Each EIA is mapped to an accelerator slot (AS),which is a fraction of an accelerator is and managed by the AA 221.

An AA 221 may host multiple EIAs 223 and supports multi-tenancy (suchthat it allows attachments from different application instances 211belonging to different users). Each accelerator slot can only beattached to one application instance at any given time.

The data plane 301 enables users to run Deep Learning inferenceapplications using one or more remotely attached EIAs; monitor healthand performance metrics of the inference applications running on theapplication instance 211; monitor health and performance metrics of theservice components running on the accelerator appliance 221; ensuresoftware components installed on the application instance 211 areup-to-date with the one installed on accelerator appliance 221; notifyusers about the health, connectivity and performance of the attachedEIA; and/or ensure that a EIA delivers the promised performance (forexample, in terms of TOPS and memory usage).

The data plane 301 includes at least one application instance 211 and atleast one accelerator appliance 221. Each application instance 211includes an application instance manger (AIM) 317 which runs on theapplication instance 211 that is responsible for vending the connectionof the EIA to the application instance 211, checking connectivity withthe EIA, ensuring that the software components installed on theapplication instance 211 are up-to-date with the one installed on theEIA, and pushing application instance 211 specific health information tothe EIA.

The AIM 317 is launched at boot time and relaunched in case of crashesor unexpected shutdowns. When the control plane 351 attaches anaccelerator 223, it injects into the instance metadata service (IMDS)371 of the application instance 211 information on how to contact theaccelerator 223 (details on this interaction are detailed in other partsof this specification). In some embodiments, the AIM 317 uses the IMDS371 to check if an accelerator is attached. If no accelerator isattached to the AI 211, the IMDS 371 stays idle, waiting for theattachment of a new accelerator. If an accelerator is attached, the AIM317 tries to connect to an accelerator slot manager (ASM) 329 in someembodiments. The communication happens through an endpoint served by theASM 329 and initiated by AIM 317 in some embodiments. If the connectionfails or if the connection is dropped in a later moment, after a fewretries, the IMDS 371 reports the problem to the end-user. In someembodiments, the IMDS 371 is a http server that customers can use (forexample, by curling a known endpoint from within their instance) tointrospect certain data about their instance (e.g. in-stance-id,attached network interfaces, etc.).

If the connection is established, then the AIM 317 interacts with theASM 329 to take inventory of the software that to be installed. Thecomponents on the AS are expected to be running an up-to-date softwareversion or a compatible version with the components on the AI 211 at theend of this handshake procedure. In some embodiments, the up-to-datesoftware version is loaded at this time such that the software iscompatible with the model to be run. If the machine instance is lockedand the components in the AI 211 are not compatible with the componentsin the accelerator, the connection is dropped and is reported in someembodiments.

The application 213 itself uses a client library 315 to make calls tothe inference engine 325 of the accelerator 223. In some embodiments,the client library 315 uses gRPC for the remote procedure calls to theinference engine 325.

In some embodiments, the client library 315 implements an API. This APImay include one or more of the following commands:

-   -   EIA.initLibrary(eiaID)—initialize a EIA context for the        application which will be used in making calls to the EIA        attached to the customer's application instance. An optional        argument “eiaID” could be passed in case multiple EIA's are        attached to the customer's application instance. Throws        exception if the eiaID is invalid or there is no EIA attached.    -   eia.loadModel(name, model-config.xml, runtimeParameters)—load a        model with the configuration given in “model-config.xml”. The        framework, version, location and other details related to the        model could be passed using “model-config.xml”. Runtime        parameters such as max batch size could be provided using        “modelParameters”.    -   model.predict(inputTensor)—a synchronous inference API call to        the “model” loaded onto the EIA. It returns the output tensor.    -   model.predictBatch(inputTensorArray)—a synchronous inference        batch API call to the “model” loaded onto the EIA.    -   model.predictAsync(iTensor)—an asynchronous inference API call        to the “model” loaded onto the EIA. It returns a future using        which one can retrieve results.    -   outputFuture.getResults( )—return/block to retrieve the results        of the inference call issued earlier.    -   model.predictBatchAsync(iTensorArray)—an asynchronous inference        batch API call to the “model” loaded onto the EIA. It returns a        future using which one can retrieve results.    -   oFuture.getResults( )—return/block to retrieve the results of        the inference call issued earlier.    -   eia.listModels( )—list the models loaded onto the EIA “eia.”    -   eia.unloadModel(name)—unload the model “name” which was loaded        earlier. Exception is thrown if the model is not present.    -   eia.createTensor(shape, dtype)—create/allocate the tensor on EIA        context with the specified shape and type.    -   eia.copyTensor(source, target)—copy the the tensor from the        “source” to the “target.”    -   deleteTensor(inputTensor)—delete/de-allocate the tensor that was        created earlier on the EIA context.

In some embodiments, a command line utility 319 may be used to accessconnectivity information and/or generate commands for inference, etc.

The AA 221 comprises several components including accelerator slot(s)223, disk 333, and appliance management components 241. AA 221components are responsible for bootstrapping, provisioning of isolatedaccelerator slots, monitoring events from the control plane 351 (such asattachment/recycling of accelerator slots), updating slots and appliancestatus (such as health and network connectivity) to the control plane351, uploading metrics/logs.

The control plane 351 comprises a number of service components thatperform the integration with the application instance 211 launch andtermination and support for device query and management. As such, viathe control plane Q51, users may launch an application instance 211requesting that one on more accelerator slots 223 be attached as anelastic accelerator to the application instance 211, and terminate anapplication instance 211 that has an elastic inference acceleratorattached to it.

In some embodiments, maintenance notifications for application instance211 for when the accelerator appliance GQ21 backing the associatedelastic inference accelerator becomes impaired or requires maintenanceare routed through the control plane 351 to the user. Further, in someembodiments, the control plane 351 provides the metrics of theaccelerator appliance 221 and application instance 211 to a user.

As noted above, accelerator slot 223 components run on every acceleratorslot. All the components in an accelerator slot are isolated in terms ofresources such as CPU, RAM, GPU compute, GPU memory, disk, and network.Accelerator slot components serve the attached customer instance forthat accelerator slot 223.

An accelerator slot manager (ASM) 329 is responsible for theinstallation of the software components on the application instance 211.The ASM 329 listens a handshake, software synchronization, and healthchecks from the application instance 211. AIM 317 connects to the ASM329 with the software inventory that is present in the applicationinstance 211.

The ASM 329 is also responsible for receiving periodic health checksfrom the AIM 317. The ASM 329 reports the connectivity of theapplication instance 211 based on the receipt of the health checkmessage from the AIM 317. This is written to disk by ASM 329 and readand reported to the control plane by the AAM through storage 361. TheAIM 317 tracks the connectivity information. This could be retrieved bythe customer on the application instance 211 using the utilitiesprovided by the client library 315 or the command line utilities 319.

An inference engine (IE) 325 handles model loading and inferenceexecution. As shown, this engine 325 is a separate process peraccelerator slot 223. The IE 325 receives requests from the clientlibrary 315 on customer instance via a front-end receiver library. TheIE 325 encompasses the run-times needed for the inference to work.

A model validator (MV) 327 checks user provided model file syntax forcorrectness and validity. In some embodiments, this is done in as a CPUprocess that is separate from the inference engine 223 so that there isno security-related leakage to the accelerator runtime. In someembodiments, the MV 327 converts the provided model to a differentformat (such as serializing MXNET to JSON). In some embodiments, the MV327 selects the inference engine 325 to use when the application 213(including library 315) has not made a selection.

In some embodiments, an application metrics collector 331 is a set oftools used to send, collect, and aggregate metrics for the application.In some embodiments, the application metrics collector 331 is StatsD.Metrics that are collected are stored to local disk 333 which isaccessible by the appliance management components 241.

The appliance management components 241 include an accelerator appliancemanager (AAM) 343, a storage uploader 345, and a metrics and logcollector 347. The AAM 343 bootstraps the accelerator appliance 221 andprovisions accelerator slots 221 via the monitoring of stored objects ofstorage 361, de-provisions/de-attaches accelerator slots once they areno longer needed, and recycles the accelerator slot for future use. Italso monitors the accelerator slots 223 for their health and occupancy,and prepares an object to be uploaded to storage 361 by the storageuploader 345. Note that the monitoring and reporting of acceleratorscould be segregated and handled by another component.

The metrics and log collector 347 collects metrics and logs from theaccelerator slots 223 and accelerator appliance 223 and massages thedata appropriately for consumption by the control plane 351.

The storage uploader 345 uploads the health and occupancy reports(prepared by AAM 343), and metrics and log.

The inference applications using the client library 315 get theconnection information of the accelerator appliance 221 by communicatingwith AIM 317.

The AIM 317 pushes to the ASM 329 heartbeats to notify the liveness ofthe AIM 317. This information is used by the ASM 329 report back to thecontrol plane 351 about the health of the attached application instance211.

The illustrated system minimizes the number of components between anapplication 213 using an accelerator running on the application instance211 and the inference engine 325 running on the accelerator slot 223 tominimize latency and failure rate. Further, the control plane 351 of theinference service is decoupled from the data plane 301 (as shown) suchthat an outage in the control plane 351 should not impact applicationinstances 211 or the accelerator slots 223 they are using.

The EI interface (the interface to the EIA) can be attached to anapplication instance during instance launch or dynamicallyattached/detached (to/from) a live instance. The EI interface can beaccessed directly using the client library 315 or via model frameworks(such TensorFlow and MXNet frameworks). In a typical use case, anapplication instance 211 runs a larger machine learning pipeline, out ofwhich only the accelerator appliance 221 bound calls will be sent usingthe EI interface API and the rest executed locally. Pre-processing ofdata input and post-processing of inferencing output is also done on theapplication instance 211. An example of an API command for launching aninstance with an accelerator is as follows:

$ aws ec2 run-instances --region us-east-1 --eia-specificationtype=fp16.eia.medium --instance-type t2.medium --image-id ami-e3bb7399

The EI interface is sized by specifying arithmetic precision (such asFP32, FP16, INT8, etc.) and computational capacity (TOPS). An EIinterface API allows for loading models, making inference calls againstthem (such as tensor in/tensor out), and unloading models. Multiplemodels can be loaded via an EI interface at any given time. A modelconsists of (i) a description of the whole computation graph forinference, and (ii) weights obtained from training. An example of an APIcommand for loading is as follows:

$ eia load-model --model-location “s3 location”--role“eiaRole”--model_name “my_model_1”--max_batch_size 16

Models come in many different formats and embodiments of the servicedescribed herein support multiple formats. In some embodiments, modelformats exported from TensorFlow and MXNet frameworks and model exchangeformats like ONNX are supported. How a particular format is treated mayvary. Typically, a model is loaded into an application instance andaccelerator via one or more files and/or objects. For example, a modelmay be loaded into storage (such as storage 361) and then made availableto the application instance and accelerator. These files and/or objectsspecify the model as a weighted computational graph such as in theformat of TensorFlow, Apache MXNet, or ONNX. The model definition willuse built-in operators/layers defined in the respective framework orinterchange format. The model format version is specified in the modelfile and is the version number of the respective framework that was usedto export the file (e.g., TensorFlow 1.5, MXNet 1.0, ONNX 1.0). In someembodiments, the accelerator runtime (such as model validator 327) willuse this information to determine which inference engine 325 to use toserve the model.

During EI interface initialization, the trained model (computationgraph) is provided as input and profiled, and, subsequently, theapplication 213 makes inferencing calls via the client library 315 onthe application instance 211. There are many ways to implement thisapproach.

In some embodiments, ahead-of-time (AOT) compilation is used. Forexample, during the model loading on the EI interface, the trained modelis compiled into target (hardware) code. This involves two sub-steps.First, a frontend compiler converts from the trained model file formatto an intermediate representation while incorporating target-independentoptimizations and analyses. Second, a backend compiler converts from theintermediate representation to machine code with target-dependentoptimizations and analyses. This “AOT” compilation allows for wholeprogram analysis. The target hardware is a combination of a CPU andaccelerator device on the accelerator appliance 221 with the compilationis done on the accelerator appliance 221. The output incorporates anoptimized execution plan for inference that is specific to the targetarchitecture. The compile phase may need additional input like maximumbatch size. Additionally, the representation can also be serialized tostorage if needed, so that the compile phase can be avoided for futureinstantiations of inference for the same model and accelerator appliance221 hardware. The runtime on the accelerator appliance 221 instantiatesthis as an “inference runtime object” in memory and uses it to executefuture inferencing calls on the EI interface. The AOT compilationapproach removes (most of the) machine learning (ML) engine dependency,hence the runtime has a low memory footprint and lower CPU overhead. Inmany cases, it may also lead to higher inferencing performance.

In some embodiments, a ML engine on the accelerator appliance 221 isutilized. The ML engine takes in the model as input and executes itduring inferencing. Because the ML engine traverses the model graph andcalls operator level API, this will have higher memory footprint and CPUoverhead on the accelerator appliance 221.

In some embodiment, a ML engine on the application instance 211 isutilized. For some GPU-based acceleration, the CPU splits thecomputation between itself and the GPU and makes calls to the interfaceto offload computation to the GPU. This allows an ML engine to run onthe customer instance and make calls over the network to the acceleratorappliance 221 at the granularity of computation primitives. It is alsopossible to reduce latency of this approach by aggregating remote callsand sending them in a batch to the accelerator appliance 221. The clientlibrary 315 will be used to load the model on accelerator appliance 221underneath the framework and subsequently to make inference calls to it.

In some embodiments, the advertised TOPS is attributable to the computecapacity of the acceleration hardware and not the CPU of that would runthe application instance 211. Most compute-intensive operators have willbe executed on the accelerator (for example, MXNet has a GPUimplementation), but in control flow operators may not be expressible inserialized model format and will run on the CPU. Each accelerator sloton the accelerator appliance 221 also gets a share of the CPU of theapplication instance 211 and that share is proportional to provisionedTOPS.

In some embodiments, the syntax of the model is validated forcorrectness and conformity to the respective framework/version so thatthe customer cannot use this form as input to exploit vulnerabilities inthe inference engines 223. The model validator verifies model syntax foreach framework/format. This validation is done as a process that isseparate from the inference engine 223 so that there is nosecurity-related leakage to GPU runtime.

FIG. 4 illustrates examples of method of appliance provisioning as aswim lane diagram. This illustration focuses on the actions andcommunication between the control plane 351 and data plane components(such as accelerator appliance manager 343 and accelerator slot 223). Asnoted above, an appliance includes a controller (such as a CPU) andmultiple accelerators (such as GPUs, ASICs, and FPGAs) coupled to thecontroller. The accelerator appliance manager 343 is responsible forprovisioning and isolating the accelerator slot 223 which is a fractionof an accelerator, attaching/detaching application instances toaccelerator slots, cleaning up and recycling the accelerators for futureattachments, collecting and reporting the health and connectivity of theaccelerators, and/or handling version upgrades of accelerator software.Storage 361 is used for object storage.

At circle 1, control plane 351 sends provisioning data to theaccelerator appliance manager 343. This provisioning data includes oneor more of an identifier of the accelerator appliance, one or moreidentifiers of accelerators to use, one or more identifiers of theaccelerator types, an identifier or location of metadata storage, anidentifier or location of log(s) (such as health logs and dumps)storage, and an encryption key (or location thereof). The acceleratorappliance that is chosen matches the size and precision of theprovisioning request of the user.

The accelerator appliance manager 343 performs a launch/configure ofeach accelerator slot 223 to use at circle 2. In some embodiments, thisincludes launching of a container, or virtual machine for the machinelearning model. In some embodiments, bare metal is used.

The accelerator appliance manager 343 writes to the identified logstorage 361 with log information at circle 3. For example, connectivityinformation to the health metric file (empty configuration may bewritten at this point. Examples of health metrics include, but are notlimited to: an identity of the appliance, an identify of the instance,an identification of the appliance type, an indication of the healthstatus (such as okay, impaired, stopped, etc.), and a time of the log.Note the connectivity information at this point in terms of theaccelerator slot is typically empty as provisioning has just occurred.

Additionally, metrics information may be written. Exemplary metricsinclude, but are not limited to: datum for a metric such as a name, aunit, a value, statistical values (maximum value, minimum value, samplecount, sum of values for a reference period), and a timestamp; andmetric dimensions such as an instance identifier, an identifier of theaccelerator slot, an identifier of the type of accelerator slot, anidentifier of the software configuration for the instance; and anapplication instance identifier, etc.

Storing this information in storage 361 allows the control plane 351 toutilize the information. Each accelerator slot 223 produces a health andconnectivity information and provides this to the accelerator appliancemanager 343 at circle 4 which in turn updates the storage 361 at circle5. In some embodiments, the health and connectivity information isproduced each minute, however, in other embodiments this information isproduced on demand, at a different rate, etc.

At some point the control plane 351 will poll for at least the health(such as polling for a health file) at circle 4. The storage 361responds with the health information at circle 5 and the control plane351 evaluates whether the provisioning was successful based on thishealth information. Provisioning may fail. For example, bootstrap issuessuch as failure to provision a slot may occur, or storage issues mayoccur such as a failure to write or write a health, metric, log, or dumpinformation. For example, in some embodiments, if health information foran accelerator slot is never generated, the control plane 351reprovisions the entire appliance. In some embodiments, when the dataplane fails to put health information in storage 361, the control plane351 waits until health information arrives (and times out at some pointif one does not arrive) and a reprovisioning of the appliance occurs.Note that the control plane 351 may request (via the acceleratorappliance manager 343), a resend of information if there is any datamissing in storage 361.

FIG. 5 illustrates an embodiment of accelerator appliance provisioning.As shown, the accelerator appliance 221 includes a plurality ofaccelerator slots (AS 1 325, AS 2, . . . , AS n). User provisioning datais received by the AAM 343 which then sets up each of the acceleratorslots as needed. In this example, only AS 1 223 is setup. The AAM 343does, however, track usage of the other accelerator slots. For example,AS 2 may be attached to a different application instance and the AAM 343would know that and govern usage of the resources of the acceleratorappliance 221 accordingly.

FIG. 6 illustrates an embodiment of accelerator appliancepre-attachment. As shown, the accelerator appliance 221 includes aplurality of accelerator slots (AS 1 223, AS 2, . . . , AS n). Each ofthe accelerator slots communicates with the AAM 343 (for example,through a local disk or directly) health, metric, and log information.The AAM 343 communicates the health and metrics information, peraccelerator slot, in a JavaScript Object Notation (JSON) format to astorage location (such as storage 361) that is accessible to the controlplane. Log and dump information, per accelerator slot, is also madeavailable to the storage location that is accessible to the controlplane. In some embodiments, the information is periodically sent out.The periodicity may be user defined or defined by the web servicesprovider. In other embodiments, the information is sent out as itchanges. For example, as health information changes (an accelerator slotbecomes unhealthy).

FIG. 7 illustrates examples of method of appliance attaching as a swimlane diagram. This illustration focuses on the actions and communicationbetween the control plane 351 and data plane components (acceleratorappliance manager 343 and accelerator slot 223).

At circle 1, control plane 351 sends connectivity information to theaccelerator appliance manager 343 via storage 361. This connectivitydata includes one or more of: attachment metadata, health/connectivitydata, and metrics data. In some embodiments, one or more of these arestored as separate files (such as an attachment metadata file, ahealth/connectivity file, etc.).

The attachment metadata may include, but is not limited to: attachmentinformation such as a customer account identifier, an attachmentidentifier, an attachment type (the type of the accelerator slot 223),an application instance identifier, a domain identifier, a VLANidentifier of the network interface, a MAC of the network interface, andan IP address of the network interface.

The health/connectivity data may include, but is not limited to: healthdata such as an identity of the appliance, an identify of the instance,an identification of the appliance type, and an indication of the healthstatus (such as okay, impaired, stopped, etc.), and a time of the log;and connectivity data such as connectivity status(connected/disconnected), an attachment identifier, an attachment type(the type of the accelerator slot 223), an application instanceidentifier, a domain identifier, and a timestamp.

Metrics data may include, but is not limited to: datum for a metric suchas a name, a unit, a value, statistical values (maximum value, minimumvalue, sample count, sum of values for a reference period), and atimestamp; and metric dimensions such as an instance identifier, anidentifier of the accelerator slot, an identifier of the type ofaccelerator slot, an identifier of the software configuration for theinstance; an application instance identifier, etc.

The accelerator appliance manager 343 requests connectivity datainformation from the storage 361 at circle 2. The connectivity datainformation (if available), are provided at circle 3. The applianceapplication manager 343 then uses this information to attach one or moreaccelerator slots QA08 (for example, as detailed in attachment metadata)and the accelerator slot(s) 223 provides connectivity information backto the appliance application manager 343 at circle 4.

The accelerator appliance manager 343 writes to the identified logstorage 361 with log information at circle 5. For example, connectivityinformation to the health metric information is written. Examples ofhealth metrics where detailed above, however, they should not be emptyat this point. Additionally, non-health metrics information may bewritten. Exemplary non-health metrics may include, but are not limitedto: datum for a metric such as a name, a unit, a value, statisticalvalues (maximum value, minimum value, sample count, sum of values for areference period), and a timestamp; and metric dimensions such as aninstance identifier, an identifier of the accelerator slot, anidentifier of the type of accelerator slot, an identifier of thesoftware configuration for the instance; an application instanceidentifier, etc.

At some point the control plane 351 will poll for at least the healthinformation at circle 6. The storage 361 responds with the healthinformation at circle 7 and the control plane 351 evaluates whether theattachment was successful based on this health information at circle 8.

Note that attachment may fail. For example, storage issues may occursuch as a failure to write or read an attachment metadata information,or failure to write or read health, metric, log, or dump information.For example, in some embodiments, if the control plane 351 fails to sendattachment metadata, the data plane will continue as it was previouslyacting. The control plane 351 will need to figure out what went wronghowever. In some embodiments, when the data plane fails to read theattachment information, the accelerator slot 223 referenced by theattachment metadata will not know it is attached and the control plane351 will consider the attachment impaired until the there is no longerany connectivity (as provided in the health data by the accelerator slot223). In some embodiments, if the data plane fails to send a healthinformation, or the control plane 351 fails to read the healthinformation, the control plane 351 will consider the attachment impaireduntil the there is no longer any connectivity (as provided in the healthdata by the accelerator slot 223).

FIG. 8 illustrates an embodiment of accelerator appliance attachment. Inparticular, one accelerator slot is attached. As shown, the acceleratorappliance 221 includes a plurality of accelerator slots (AS 1 223, AS 2,. . . , AS n). An JSON metadata file is provided to AAM 343 indicating auser account has been attached to the application instance that is touse the accelerator appliance. The AAM 343 updates the health, metrics,and log and dump information and makes it available to the storage thatis accessible to the control plane. As such, the control plane will knowthat the slot has been attached.

FIG. 9 illustrates examples of method of appliancede-attaching/recycling as a swim lane diagram. This illustration focuseson the actions and communication between the control plane 351 and dataplane components (accelerator appliance manager 343 and accelerator slot223). At some point, an accelerator slot 223 will not be needed. Thecontrol plane 351 will inform that accelerator slot 223 of this. First,the control plane marks the targeted accelerator slot as in need ofcleaning at circle 1.

The control plane 351 updates the metadata information of storage 361 atcircle 2 to empty all connectivity information and putting in cleaningtoken that will be used by the accelerator slot 223 to confirm that thecleaning process has completed. For example, the attachment informationwill only have the cleaning token.

The accelerator appliance manager 343 requests one or more of theconnectivity data from the storage 361 at circle 3. The connectivitydata (if available), are provided at circle 4. The appliance applicationmanager 343 then uses this information to de-attach one or moreaccelerator slots 223 (for example, as detailed in attachment metadata)and the accelerator slot(s) 223 provide connectivity information back tothe appliance application manager 343 at circle 4.

The appliance application manager 343 informs the accelerator slot 223to cleanup/recycle at circle 5. The accelerator slot 223 frees upresources being used by the application (such as addresses in memory,cache, etc.) and informs the appliance application manager 343 that thecleanup/recycling is complete at circle 6.

The accelerator appliance manager 343 writes to the storage 361 updatedhealth information with the cleaning token included in addition to thenormal health information for empty connectivity at circle 6.

At some point the control plane 351 will poll for at least the healthinformation at circle 8. The storage 361 responds with the healthinformation at circle 9 and the control plane 351 evaluates whether thede-attachment was successful based on this health information at circle10. Note that de-attachment may fail. For example, storage issues mayoccur such as a failure to write or read update attachment metadatainformation, or failure to a read a cleaning token by the control plane351. For example, in some embodiments, if the control plane 351 fails tosend the updated attachment metadata, the data plane will continue as itwas previously acting, but the control plane 351 will consider theattachment impaired since the customer instance was stopped. The controlplane 351 will need to figure out what went wrong however. In someembodiments, when the data plane fails to read the updated metadatainformation, the accelerator slot 223 referenced by the attachmentmetadata will not know it is to be de-attached and the control plane 351will consider the attachment to be in a cleaning state. No new placementto the accelerator slot 223 will occur until the cleaning state has beenlifted.

FIG. 10 illustrates embodiments of a swim diagram of a method of usingan accelerator for elastic inference including interactions betweenapplication instance and an accelerator appliance.

As shown, the AIM 317 reads the IMDS to get information on how tocontact the accelerator 222. In some embodiments, the IMDS informationincludes information on how to contact a particular accelerator slot223.

The AIM 317 and ASM 329 of the accelerator slot 223 perform a handshakeoperation to determine compatibility. If compatible, the inferenceapplication 213 of the application instance 211 acquires the address ofthe accelerator from the AIM 317. As such, the inference application 213now knows where to address scoring data it is to process.

The ASM 329 of the accelerator slot to be used by the applicationinstance updates its connectivity and health information in a local disk333 of the accelerator appliance or using a communication channel 281.The AAM 343 reads this information and places it into storage 361accessible by the control plane. As such, the application instance andaccelerator slot have learned how to connect to each other, and theaccelerator appliance has made that information available to the controlplane 351. How the control plane interacts with that data is detailedelsewhere.

The inference application 213 also loads one or more models that itwants to use to the accelerator slot. In some embodiments, this load isto an inference engine 325 which then calls the model validator 327 tovalidate any uploaded model(s). The success or failure of thatvalidation is provided to the inference engine. In other embodiments,the load from the inference engine 212 is to the model validator 327which validates the model, chooses an inference engine 325 to utilize,and provides the validated model to the chosen inference engine 325. Anindication of successful model loading is provided to the inferenceapplication 213.

As scoring data is received by the inference application 213 is directedto the inference engine 325 and the result(s) are passed back.

When the model is not longer to be used, it is unloaded via a commandfrom the inference application 213 to the accelerator slot. Inparticular, the inference engine 325 is no longer provisioned to handlerequests from the inference application 213.

Note, as discussed elsewhere, the accelerator slot (ASM 329 inparticular) updates the local disk 333 with connectivity informationwhich the AAM 343 provides to storage 361 for consumption, or sends overa communication channel 281. When the control plane 351 determines thereis no connectivity (such as after unload of the model or failure) viathe storage 361, it makes the slot as being impaired.

Additionally, failures when using one or more accelerator slots canhappen because of connectivity issues, component failures, componentincompatibilities, etc. Detecting the failure, identifying the rootcause, and notifying the user to take necessary and corrective actionare functions the elastic inference service 105 provides in someembodiments. As noted above, an accelerator slot emits metrics regardingconnection health and slot health which are then uploaded by the AAM 343to storage 361 for consumption by the control plane 351. Connectionhealth could be in one of these states: connected and not connected.Connected indicates that the application instance 211 is able to reachthe accelerator slot 223 via “application level ping” and theapplication instance 211 components are compatible with the componentson the accelerator slot 223. Not connected could mean either theapplication instance 211 couldn't reach the ASM 329 or the componentsare incompatible.

Accelerator health identifies whether the accelerator is healthy.Accelerator health could be in one of these many states including, butnot limited to: healthy or unhealthy. The healthiness of the acceleratorslot 223 depends on a variety of factors including whether the inferenceengine 325 is able to respond to inference requests. This check is doneby ASM 329 by pinging the inference engine 325.

ASM 329 emits these states per accelerator to a local disk 333 whichthis then read by the AAM 343 and forwarded states to the control plane351. The control plane 351 consolidates these states to one state forwhich reflects the state of the attachment as: OK, Impaired and Unknownand made available to the user.

FIG. 11 illustrates embodiments of a method performed by a web servicesprovider in implementing an elastic inference service. At 1101, a frontend of the web services provider receives application instanceconfiguration information that is to be used by the elastic inferenceservice. For example, the front end 103 receives configurationinformation and provides it to at least the elastic inference service105. Configuration information may include, but is not limited to, oneor more of: an indication of a machine image, an indication of aninstance type for the application instance, virtual network informationto be utilized by the application instance, an indication of anaccelerator type to use for inference, and an indication of one or morestorage locations to be used (such as a location of the application, alocation that results of the inference are to be located, a location ofhealth and connectivity information, auto-scaling usage, etc.).

In some embodiments, the application instance and/or the acceleratorappliance are a subjected to auto-scaling by the elastic inferenceservice 105 (as opposed to scaling manually). Auto-scaling attempts todistribute instances evenly by launching new instances of theapplication and/or the accelerator slot(s) on devices with the fewestinstances. When rebalancing (such as after an accelerator slot becomesunhealthy), auto-scaling launches new instances before terminating theold ones, so that rebalancing does not compromise the performance oravailability of the application. Typically, the configurationinformation includes an indication of whether auto-scaling should beapplied by the elastic inference service 105.

An application instance is provisioned along with at least oneaccelerator slot according to the received configuration at 1103. Anexample of provisioning an accelerator slot is described by FIG. 4 andassociated text.

In some embodiments, the elastic inference service includes a locationselection functionality that performs location optimization forresources in the web services provider. Using the location selectionfunctionality, a particular one of the accelerator locations may beselected for a physical accelerator that implements an accelerator slot.The accelerator slot location may be selected based (at least in part)on one or more placement criteria. Using the location selectionfunctionality, a particular one of the accelerator slot locations may beselected for a physical compute instance that implements a virtualcompute instance (such as on the same physical machine). The applicationinstance location may also be selected based (at least in part) on oneor more placement criteria.

The placement criteria used to select the accelerator slot location maybe the same criteria or different criteria as the placement criteriaused to select the application instance location. In one embodiment,both the application instance location and the GPU location may beoptimized for a particular virtual compute instance and its attachedvirtual GPU. In one embodiment, the placement criteria used to optimizethe placement of a particular virtual application instance and/oraccelerator slot is provided or approved by a client of the providernetwork. In one embodiment, the placement criteria used to optimize theplacement of a particular application instance and/or accelerator slotmay be provided or approved by an administrator of the provider network.In one embodiment, the placement criteria used to optimize the placementof a particular application instance and/or accelerator slot may bedetermined using a default configuration.

The one or more placement criteria may include or be associated withoptimization (e.g., improvement) of metrics for performance (e.g., tomaximize performance), resource usage (e.g., to minimize resourceusage), cost (e.g., to minimize cost or fit resource costs within aclient-specified budget), energy usage (e.g., to minimize energy usageor prioritize “green” energy), network locality (e.g., to minimizenetworking proximity between two or more resources), and/or any othersuitable metrics. Performance metrics and cost metrics used as placementcriteria may often be associated with the use of the physicalaccelerator by the physical compute instance. Performance metrics mayinclude network-related metrics such as latency and bandwidth, asmeasured within the provider network and/or between the provider networkand a client device. Performance metrics may include any other metricsrelated to processor use, GPU use, memory use, storage use, and so on.As an example, to minimize network latency and/or bandwidth, anapplication instance location for a physical compute instance may beselected within the same rack as the physical accelerator such thatnetwork communication between the underlying physical compute instanceand physical accelerator may not extend beyond a top-of-rack switch inthe rack. If locations within the same rack are not available, then aninstance location nearby the physical accelerator (e.g., within the samedata center) may be selected to optimize the placement criteria. Asanother example, an accelerator location in a data center nearest theclient device may be selected to minimize latency between the physicalaccelerator and the client device, where the proximity of the datacenter to the client device is measured based on anticipated orhistorical latency and/or on geographical proximity.

As used herein, provisioning generally includes reserving resources(e.g., computational and memory resources) of an underlying physicalcompute instance for the client (e.g., from a pool of available physicalcompute instances and other resources), installing or launching requiredsoftware (e.g., an operating system), and making the virtual computeinstance available to the client for performing tasks specified by theclient. The virtual compute instance may be selected from a plurality ofinstance types having various capabilities.

Placement optimization for network locality may attempt to groupmultiple resources (e.g., one or more physical compute instances and oneor more physical accelerators) based (at least in part) on proximitywithin a network. Network locality may refer to one or more locations,connections, associations, or zones in a network to which a resourcebelongs. A resource itself may be a node or particular network location(e.g., network address) and thus a network locality. Network localitymay be determined based on the network router, switch, or other networkdevice or infrastructure (e.g., network spine) to which a resource isconnected. Network localities may be logically determined according tologically associated network devices or resource in some embodiments. Aresource may belong to multiple network localities, such as beingconnected to a particular network router, which may be in turn linked toother network routers, or networking devices. Application instancelocations and/or accelerator locations may be selected based (at leastin part) on network locality.

At 1105, a client library is loaded onto the provisioned applicationinstance. In some embodiments, an instance manager is alsoloaded/installed. The functionality of these components has beendetailed elsewhere.

An accelerator slot is attached to the application instance at 1107.FIG. QD illustrates embodiments of accelerator slot attachment.

The request to load a model in the accelerator slot is received at 1109.For example, the ASM 329 receives this request. Typically, this requestto load a model includes a location of the model. Note, this request maybe from a user, or come from the provisioned application instance.

The model to be loaded is validated, an inference engine to use isdetermined, and the model is loaded at 1111. Examples of modelvalidation and inference engine selection have been detailed earlier.

Inferences are performed using the loaded model during execution of theapplication at 1113 and results are returned as dictated by theapplication of the application instance at 1115. Note the acceleratorappliance is managed including resource governed during the above.

FIG. 12 illustrates embodiments of a method performed by a web servicesprovider in implementing an elastic inference service. In particular,embodiments of the method describe handling of inference requests.

At 1200, a plurality of accelerator slots are configured for use by anapplication instance. The configuration includes provisioning,attaching, selecting, model loading, etc. as detailed elsewhere such asFIG. 11 , for example. Note that each of the accelerator slots isseparately addressable and an application may call different acceleratorslots to perform different actions.

At 1201, an inference request is received by an application instance.For example, the front end 103 receives scoring data and provides thisdata an application instance 211.

The inference request data (scoring data) is forwarded to the coupledinference engines of a plurality of accelerators attached to theapplication instance at 1203. For example, the client library 315 iscalled to forward this data from an application 213 to a plurality ofinference engines 325.

An initial response is received from one of the plurality of acceleratorslots by the application at 1205. This response is considered to be theresult to use. As subsequent responses are received they are processedat 1207. In some embodiments, the processing includes throwing out oneor more of the subsequent responses. In some embodiments, subsequentresponses are merged. The application uses the initial response at 1209.

In some embodiments, the timing of responses is tracked. For example, aseach of the responses is received how long the response took iscalculated. The tracking of timing allows for an application (orapplication user) to determine if an accelerator slot should bedeattached and a different one attached. At 1211, a determination of iftiming of one or more responses is greater than a threshold is made andone or more of the user is alerted for potential migration and/or anactual migration to a different accelerator slot is made. As such, as anaccelerator appliance 221, or network(s) coupling the acceleratorappliance 221 and application instance 211, experiences slowdowns, theapplication and/or user is able to adjust. Note the acceleratorappliance is managed including resource governed during the above.

The deattachment and new attachment is a form of migration. As such,there is a replacement of one or more accelerator slots with one or moreaccelerator slots for the application instance, a migration ofprocessing for the application instance from the first set of one ormore accelerator slots to the second set of one or more acceleratorslots, and execution of the application of the application instanceusing the second set of one or more accelerator slots. In someembodiments, the new one or more accelerator slots provide a differentlevel of processing relative to the first set of one or more acceleratorslots. In some embodiments, replacing the first set of one or moreaccelerator slots with the second set of one or more accelerator slotscomprises causing the second set of one more accelerator slots to assumeoperation in place of the first set of one more accelerator slots

FIG. 13 illustrates embodiments of a method performed by a web servicesprovider in implementing an elastic inference service. In particular,embodiments of the method describe handling of a provisioning of anaccelerator slot.

At 1301, a request is received by provision and attach an acceleratorslot for a model. The request may include one more of a data type to beused, the model itself (or a location thereof), timing requirements,cost requirements, etc.

The available accelerator slots that meet the requirements of therequest are determined at 1303. For example, the data types of the modelare evaluated and accelerator slots that cannot handle those types aredeemed to not meet the requirements. In some embodiments, thisdetermination includes executing the model to determine what acceleratorslots will work and meet the requirements. In other embodiments, themodel is compared to other models that have been run by the elasticinference service and the previous execution of similar models informsthe determination. Additionally, the location of the accelerator slotmay be optimized as detailed elsewhere.

At least one or more accelerator slots that have been determined to meetthe requirements of the request are provisioned at 1305. The provisionedone or more accelerator slots are attached to the application instanceat 1307. Provisioning and attaching have been detailed earlier.

Incoming inference request data (scoring data) is forwarded to thecoupled inference engine(s) of the at least one or more acceleratorsslots attached to the application instance at 1309. For example, theclient library 315 is called to forward this data from an application213 to a plurality of inference engines 325.

The response(s) is/are tracked at 1311. For example, as each of theresponses is received how long the response took is calculated and/orany errors thrown by the accelerator slot(s).

An evaluation of the accelerator slots that met the requirements of themodel and application is made at 1313 in some embodiments. For example,are the responses timely, is the result correct, is the accelerator slothealthy, etc.?

In some embodiments, at 1315, one or more of the attached acceleratorslots are de-attached at 1315 if they no longer meet the requirements.

In some embodiments, another determination of available acceleratorslots that meet the requirements of the request are determined if theslot(s) are not meeting the requirements. This allows for scaling. Notethat de-attachment may not always occur and. in some embodiments, moreslots are allocated to scale.

Note the accelerator appliance is managed including resource governedduring the above.

FIG. 14 illustrates embodiments of a systems using an accelerator-basedinference service. This illustration highlights networking aspects ofsuch systems. The accelerator-based inference service virtual network1401 includes one more accelerator appliances 1421. As detailed, eachaccelerator appliance has one or more accelerator slots 1423 that arecoupled to a “trunking” communication channel 1403 of theaccelerator-based inference service communication channel (such as anetwork) 1401. The trunk communication channel 1403 knows the locationidentifier of each accelerator slot 1423 of the accelerator appliance1421.

As shown, users have different virtual networks (user A's virtualnetwork 1411 and user B's virtual network 1431). Within each virtualnetwork is at least one network interface (such as communication channel1415 and communication channel 1435) and at least one applicationinstance (such as application instance 1413 and application instance1433). An application instance communicates with an accelerator slot viaits network interface in the user's virtual network.

In some embodiments, a network namespace is utilized to isolate networkinterfaces among accelerator slots on the same physical acceleratorappliance such that each accelerator slot's network interface resides inits own namespace. Moving an accelerator slot's network interface to itsown namespace allows for different virtual networks to have overlappingIP addresses.

FIG. 15 illustrates an example provider network (or “service providersystem”) environment according to some embodiments. A provider network1500 may provide resource virtualization to customers via one or morevirtualization services 1510 that allow customers to purchase, rent, orotherwise obtain instances 1512 of virtualized resources, including butnot limited to computation and storage resources, implemented on deviceswithin the provider network or networks in one or more data centers.Local Internet Protocol (IP) addresses 1516 may be associated with theresource instances 1512; the local IP addresses are the internal networkaddresses of the resource instances 1512 on the provider network 1500.In some embodiments, the provider network 1500 may also provide publicIP addresses 1514 and/or public IP address ranges (e.g., InternetProtocol version 4 (IPv4) or Internet Protocol version 6 (IPv6)addresses) that customers may obtain from the provider 1500.

Conventionally, the provider network 1500, via the virtualizationservices 1510, may allow a customer of the service provider (e.g., acustomer that operates one or more client networks 1550A-1550C includingone or more customer device(s) 1552) to dynamically associate at leastsome public IP addresses 1514 assigned or allocated to the customer withparticular resource instances 1512 assigned to the customer. Theprovider network 1500 may also allow the customer to remap a public IPaddress 1514, previously mapped to one virtualized computing resourceinstance 1512 allocated to the customer, to another virtualizedcomputing resource instance 1512 that is also allocated to the customer.Using the virtualized computing resource instances 1512 and public IPaddresses 1514 provided by the service provider, a customer of theservice provider such as the operator of customer network(s) 1550A-1550Cmay, for example, implement customer-specific applications and presentthe customer's applications on an intermediate network 1540, such as theInternet. Other network entities 1520 on the intermediate network 1540may then generate traffic to a destination public IP address 1514published by the customer network(s) 1550A-1550C; the traffic is routedto the service provider data center, and at the data center is routed,via a network substrate, to the local IP address 1516 of the virtualizedcomputing resource instance 1512 currently mapped to the destinationpublic IP address 1514. Similarly, response traffic from the virtualizedcomputing resource instance 1512 may be routed via the network substrateback onto the intermediate network 1540 to the source entity 1520.

Local IP addresses, as used herein, refer to the internal or “private”network addresses, for example, of resource instances in a providernetwork. Local IP addresses can be within address blocks reserved byInternet Engineering Task Force (IETF) Request for Comments (RFC) 1918and/or of an address format specified by IETF RFC 4193, and may bemutable within the provider network. Network traffic originating outsidethe provider network is not directly routed to local IP addresses;instead, the traffic uses public IP addresses that are mapped to thelocal IP addresses of the resource instances. The provider network mayinclude networking devices or appliances that provide network addresstranslation (NAT) or similar functionality to perform the mapping frompublic IP addresses to local IP addresses and vice versa.

Public IP addresses are Internet mutable network addresses that areassigned to resource instances, either by the service provider or by thecustomer. Traffic routed to a public IP address is translated, forexample via 1:1 NAT, and forwarded to the respective local IP address ofa resource instance.

Some public IP addresses may be assigned by the provider networkinfrastructure to particular resource instances; these public IPaddresses may be referred to as standard public IP addresses, or simplystandard IP addresses. In some embodiments, the mapping of a standard IPaddress to a local IP address of a resource instance is the defaultlaunch configuration for all resource instance types.

At least some public IP addresses may be allocated to or obtained bycustomers of the provider network 1500; a customer may then assign theirallocated public IP addresses to particular resource instances allocatedto the customer. These public IP addresses may be referred to ascustomer public IP addresses, or simply customer IP addresses. Insteadof being assigned by the provider network 1500 to resource instances asin the case of standard IP addresses, customer IP addresses may beassigned to resource instances by the customers, for example via an APIprovided by the service provider. Unlike standard IP addresses, customerIP addresses are allocated to customer accounts and can be remapped toother resource instances by the respective customers as necessary ordesired. A customer IP address is associated with a customer's account,not a particular resource instance, and the customer controls that IPaddress until the customer chooses to release it. Unlike conventionalstatic IP addresses, customer IP addresses allow the customer to maskresource instance or availability zone failures by remapping thecustomer's public IP addresses to any resource instance associated withthe customer's account. The customer IP addresses, for example, enable acustomer to engineer around problems with the customer's resourceinstances or software by remapping customer IP addresses to replacementresource instances.

FIG. 16 illustrates an example data center that implements an overlaynetwork on a network substrate using IP tunneling technology, accordingto some embodiments. A provider data center 1600 may include a networksubstrate that includes networking nodes 1612 such as routers, switches,network address translators (NATs), and so on, which may be implementedas software, hardware, or as a combination thereof. Some embodiments mayemploy an Internet Protocol (IP) tunneling technology to provide anoverlay network via which encapsulated packets may be passed throughnetwork substrate 1610 using tunnels. The IP tunneling technology mayprovide a mapping and encapsulating system for creating an overlaynetwork on a network (e.g., a local network in data center 1600 of FIG.16 ) and may provide a separate namespace for the overlay layer (thepublic IP addresses) and the network substrate 1610 layer (the local IPaddresses). Packets in the overlay layer may be checked against amapping directory (e.g., provided by mapping service 1630) to determinewhat their tunnel substrate target (local IP address) should be. The IPtunneling technology provides a virtual network topology (the overlaynetwork); the interfaces (e.g., service APIs) that are presented tocustomers are attached to the overlay network so that when a customerprovides an IP address to which the customer wants to send packets, theIP address is run in virtual space by communicating with a mappingservice (e.g., mapping service 1630) that knows where the IP overlayaddresses are.

In some embodiments, the IP tunneling technology may map IP overlayaddresses (public IP addresses) to substrate IP addresses (local IPaddresses), encapsulate the packets in a tunnel between the twonamespaces, and deliver the packet to the correct endpoint via thetunnel, where the encapsulation is stripped from the packet. In FIG. 16, an example overlay network tunnel 1634A from a virtual machine (VM)1624A (of VMs 1624A1-1624A4, via VMM 1622A) on host 1620A to a device onthe intermediate network 1650 and an example overlay network tunnel1634B between a VM 1624A (of VMs 1624A1-1624A4, via VMM 1622A) on host1620A and a VM 1624B (of VMs 1624B1-1624B4, via VMM 1622B) on host 1620Bare shown. In some embodiments, a packet may be encapsulated in anoverlay network packet format before sending, and the overlay networkpacket may be stripped after receiving. In other embodiments, instead ofencapsulating packets in overlay network packets, an overlay networkaddress (public IP address) may be embedded in a substrate address(local IP address) of a packet before sending, and stripped from thepacket address upon receiving. As an example, the overlay network may beimplemented using 32-bit IPv4 (Internet Protocol version 4) addresses asthe public IP addresses, and the IPv4 addresses may be embedded as partof 128-bit IPv6 (Internet Protocol version 6) addresses used on thesubstrate network as the local IP addresses.

Referring to FIG. 16 , at least some networks in which embodiments maybe implemented may include hardware virtualization technology thatenables multiple operating systems to run concurrently on a hostcomputer (e.g., hosts 1620A and 1620B of FIG. 16 ), i.e. as virtualmachines (VMs) 1624 on the hosts 1620. The VMs 1624 may, for example, beexecuted in slots on the hosts 1620 that are rented or leased tocustomers of a network provider. A hypervisor, or virtual machinemonitor (VMM) 1622, on a host 1620 presents the VMs 1624 on the hostwith a virtual platform and monitors the execution of the VMs 1624. EachVM 1624 may be provided with one or more local IP addresses; the VMM1622 on a host 1620 may be aware of the local IP addresses of the VMs1624 on the host. A mapping service 1630 may be aware of (e.g., viastored mapping information 1632) network IP prefixes and IP addresses ofrouters or other devices serving IP addresses on the local network. Thisincludes the IP addresses of the VMMs 1622 serving multiple VMs 1624.The mapping service 1630 may be centralized, for example on a serversystem, or alternatively may be distributed among two or more serversystems or other devices on the network. A network may, for example, usethe mapping service technology and IP tunneling technology to, forexample, route data packets between VMs 1624 on different hosts 1620within the data center 1600 network; note that an interior gatewayprotocol (IGP) may be used to exchange routing information within such alocal network.

In addition, a network such as the provider data center 1600 network(which is sometimes referred to as an autonomous system (AS)) may usethe mapping service technology, IP tunneling technology, and routingservice technology to route packets from the VMs 1624 to Internetdestinations, and from Internet sources to the VMs 1624. Note that anexternal gateway protocol (EGP) or border gateway protocol (BGP) istypically used for Internet routing between sources and destinations onthe Internet. FIG. 16 shows an example provider data center 1600implementing a network that provides resource virtualization technologyand that provides full Internet access via edge router(s) 1614 thatconnect to Internet transit providers, according to some embodiments.The provider data center 1600 may, for example, provide customers theability to implement virtual computing systems (VMs 1624) via a hardwarevirtualization service and the ability to implement virtualized datastores 1616 on storage resources 1618A-1618N via a storagevirtualization service.

The data center 1600 network may implement IP tunneling technology,mapping service technology, and a routing service technology to routetraffic to and from virtualized resources, for example to route packetsfrom the VMs 1624 on hosts 1620 in data center 1600 to Internetdestinations, and from Internet sources to the VMs 1624. Internetsources and destinations may, for example, include computing systems1670 connected to the intermediate network 1640 and computing systems1652 connected to local networks 1650 that connect to the intermediatenetwork 1640 (e.g., via edge router(s) 1614 that connect the network1650 to Internet transit providers). The provider data center 1600network may also route packets between resources in data center 1600,for example from a VM 1624 on a host 1620 in data center 1600 to otherVMs 1624 on the same host or on other hosts 1620 in data center 1600.

A service provider that provides data center 1600 may also provideadditional data center(s) 1660 that include hardware virtualizationtechnology similar to data center 1600 and that may also be connected tointermediate network 1640. Packets may be forwarded from data center1600 to other data centers 1660, for example from a VM 1624 on a host1620 in data center 1600 to another VM on another host in another,similar data center 1660, and vice versa.

While the above describes hardware virtualization technology thatenables multiple operating systems to run concurrently on host computersas virtual machines (VMs) on the hosts, where the VMs may beinstantiated on slots on hosts that are rented or leased to customers ofthe network provider, the hardware virtualization technology may also beused to provide other computing resources, for example storage resources1618A-1618N, as virtualized resources to customers of a network providerin a similar manner.

FIG. 17 illustrates an example provider network that provides virtualnetworks on the provider network to at least some customers, accordingto some embodiments. A customer's virtual network 1760 on a providernetwork 1700, for example, enables a customer to connect their existinginfrastructure (e.g., one or more customer devices 1752) on customernetwork 1750 to a set of logically isolated resource instances (e.g.,VMs 1724A and 1724B and storage 1718A and 1718B), and to extendmanagement capabilities such as security services, firewalls, andintrusion detection systems to include their resource instances.

A customer's virtual network 1760 may be connected to a customer network1750 via a private communications channel 1742. A private communicationschannel 1742 may, for example, be a tunnel implemented according to anetwork tunneling technology or some other technology over anintermediate network 1740. The intermediate network may, for example, bea shared network or a public network such as the Internet.Alternatively, a private communications channel 1742 may be implementedover a direct, dedicated connection between virtual network 1760 andcustomer network 1750.

A public network may be broadly defined as a network that provides openaccess to and interconnectivity among a plurality of entities. TheInternet, or World Wide Web (WWW) is an example of a public network. Ashared network may be broadly defined as a network to which access islimited to two or more entities, in contrast to a public network towhich access is not generally limited. A shared network may, forexample, include one or more local area networks (LANs) and/or datacenter networks, or two or more LANs or data center networks that areinterconnected to form a wide area network (WAN). Examples of sharednetworks may include, but are not limited to, corporate networks andother enterprise networks. A shared network may be anywhere in scopefrom a network that covers a local area to a global network. Note that ashared network may share at least some network infrastructure with apublic network, and that a shared network may be coupled to one or moreother networks, which may include a public network, with controlledaccess between the other network(s) and the shared network. A sharednetwork may also be viewed as a private network, in contrast to a publicnetwork such as the Internet. In some embodiments, either a sharednetwork or a public network may serve as an intermediate network betweena provider network and a customer network.

To establish a virtual network 1760 for a customer on provider network1700, one or more resource instances (e.g., VMs 1724A and 1724B andstorage 1718A and 1718B) may be allocated to the virtual network 1760.Note that other resource instances (e.g., storage 1718C and VMs 1724C)may remain available on the provider network 1700 for other customerusage. A range of public IP addresses may also be allocated to thevirtual network 1760. In addition, one or more networking nodes (e.g.,routers, switches, etc.) of the provider network 1700 may be allocatedto the virtual network 1760. A private communications channel 1742 maybe established between a private gateway 1762 at virtual network 1760and a gateway 1756 at customer network 1750.

In some embodiments, in addition to, or instead of, a private gateway1762, virtual network 1760 may include a public gateway 1764 thatenables resources within virtual network 1760 to communicate directlywith entities (e.g., network entity 1744) via intermediate network 1740,and vice versa, instead of or in addition to via private communicationschannel 1742.

Virtual network 1760 may be, but is not necessarily, subdivided into twoor more subnetworks, or subnets, 1770. For example, in implementationsthat include both a private gateway 1762 and a public gateway 1764, avirtual network 1760 may be subdivided into a subnet 1770A that includesresources (VMs 1724A and storage 1718A, in this example) reachablethrough private gateway 1762, and a subnet 1770B that includes resources(VMs 1724B and storage 1718B, in this example) reachable through publicgateway 1764.

The customer may assign particular customer public IP addresses toparticular resource instances in virtual network 1760. A network entity1744 on intermediate network 1740 may then send traffic to a public IPaddress published by the customer; the traffic is routed, by theprovider network 1700, to the associated resource instance. Returntraffic from the resource instance is routed, by the provider network1700, back to the network entity 1744 over intermediate network 1740.Note that routing traffic between a resource instance and a networkentity 1744 may require network address translation to translate betweenthe public IP address and the local IP address of the resource instance.

Some embodiments may allow a customer to remap public IP addresses in acustomer's virtual network 1760 as illustrated in FIG. 17 to devices onthe customer's external network 1750. When a packet is received (e.g.,from network entity 1744), the network 1700 may determine that thedestination IP address indicated by the packet has been remapped to anendpoint on external network 1750 and handle routing of the packet tothe respective endpoint, either via private communications channel 1742or via the intermediate network 1740. Response traffic may be routedfrom the endpoint to the network entity 1744 through the providernetwork 1700, or alternatively may be directly routed to the networkentity 1744 by the customer network 1750. From the perspective of thenetwork entity 1744, it appears as if the network entity 1744 iscommunicating with the public IP address of the customer on the providernetwork 1700. However, the network entity 1744 has actually communicatedwith the endpoint on customer network 1750.

While FIG. 17 shows network entity 1744 on intermediate network 1740 andexternal to provider network 1700, a network entity may be an entity onprovider network 1700. For example, one of the resource instancesprovided by provider network 1700 may be a network entity that sendstraffic to a public IP address published by the customer.

In some embodiments, a system that implements a portion or all of thetechniques as described herein may include a general-purpose computersystem that includes or is configured to access one or morecomputer-accessible media, such as computer system 1800 illustrated inFIG. 18 . In the illustrated embodiment, computer system 1800 includesone or more processors 1810 coupled to a system memory 1820 via aninput/output (I/O) interface 1830. Computer system 1800 further includesa network interface 1840 coupled to I/O interface 1830. While FIG. 18shows computer system 1800 as a single computing device, in variousembodiments a computer system 1800 may include one computing device orany number of computing devices configured to work together as a singlecomputer system 1800.

In various embodiments, computer system 1800 may be a uniprocessorsystem including one processor 1810, or a multiprocessor systemincluding several processors 1810 (e.g., two, four, eight, or anothersuitable number). Processors 1810 may be any suitable processors capableof executing instructions. For example, in various embodiments,processors 1810 may be general-purpose or embedded processorsimplementing any of a variety of instruction set architectures (ISAs),such as the x86, ARM, PowerPC, SPARC, or MIPS ISAs, or any othersuitable ISA. In multiprocessor systems, each of processors 1810 maycommonly, but not necessarily, implement the same ISA.

System memory 1820 may store instructions and data accessible byprocessor(s) 1810. In various embodiments, system memory 1820 may beimplemented using any suitable memory technology, such as random-accessmemory (RAM), static RAM (SRAM), synchronous dynamic RAM (SDRAM),nonvolatile/Flash-type memory, or any other type of memory. In theillustrated embodiment, program instructions and data implementing oneor more desired functions, such as those methods, techniques, and datadescribed above are shown stored within system memory 1820 as code 1825and data 1826.

In one embodiment, I/O interface 1830 may be configured to coordinateI/O traffic between processor 1810, system memory 1820, and anyperipheral devices in the device, including network interface 1840 orother peripheral interfaces. In some embodiments, I/O interface 1830 mayperform any necessary protocol, timing or other data transformations toconvert data signals from one component (e.g., system memory 1820) intoa format suitable for use by another component (e.g., processor 1810).In some embodiments, I/O interface 1830 may include support for devicesattached through various types of peripheral buses, such as a variant ofthe Peripheral Component Interconnect (PCI) bus standard or theUniversal Serial Bus (USB) standard, for example. In some embodiments,the function of I/O interface 1830 may be split into two or moreseparate components, such as a north bridge and a south bridge, forexample. Also, in some embodiments some or all of the functionality ofI/O interface 1830, such as an interface to system memory 1820, may beincorporated directly into processor 1810.

Network interface 1840 may be configured to allow data to be exchangedbetween computer system 1800 and other devices 1860 attached to anetwork or networks 1850, such as other computer systems or devices asillustrated in FIG. 1 , for example. In various embodiments, networkinterface 1840 may support communication via any suitable wired orwireless general data networks, such as types of Ethernet network, forexample. Additionally, network interface 1840 may support communicationvia telecommunications/telephony networks such as analog voice networksor digital fiber communications networks, via storage area networks(SANs) such as Fibre Channel SANs, or via I/O any other suitable type ofnetwork and/or protocol.

In some embodiments, a computer system 1800 includes one or more offloadcards 1870 (including one or more processors 1875, and possiblyincluding the one or more network interfaces 1840) that are connectedusing an I/O interface 1830 (e.g., a bus implementing a version of thePeripheral Component Interconnect—Express (PCI-E) standard, or anotherinterconnect such as a QuickPath interconnect (QPI) or UltraPathinterconnect (UPI)). For example, in some embodiments the computersystem 1800 may act as a host electronic device (e.g., operating as partof a hardware virtualization service) that hosts compute instances, andthe one or more offload cards 1870 execute a virtualization manager thatcan manage compute instances that execute on the host electronic device.As an example, in some embodiments the offload card(s) 1870 can performcompute instance management operations such as pausing and/or un-pausingcompute instances, launching and/or terminating compute instances,performing memory transfer/copying operations, etc. These managementoperations may, in some embodiments, be performed by the offload card(s)1870 in coordination with a hypervisor (e.g., upon a request from ahypervisor) that is executed by the other processors 1810A-1810N of thecomputer system 1800. However, in some embodiments the virtualizationmanager implemented by the offload card(s) 1870 can accommodate requestsfrom other entities (e.g., from compute instances themselves), and maynot coordinate with (or service) any separate hypervisor.

In some embodiments, system memory 1820 may be one embodiment of acomputer-accessible medium configured to store program instructions anddata as described above. However, in other embodiments, programinstructions and/or data may be received, sent or stored upon differenttypes of computer-accessible media. Generally speaking, acomputer-accessible medium may include non-transitory storage media ormemory media such as magnetic or optical media, e.g., disk or DVD/CDcoupled to computer system 1800 via I/O interface 1830. A non-transitorycomputer-accessible storage medium may also include any volatile ornon-volatile media such as RAM (e.g., SDRAM, double data rate (DDR)SDRAM, SRAM, etc.), read only memory (ROM), etc., that may be includedin some embodiments of computer system 1800 as system memory 1820 oranother type of memory. Further, a computer-accessible medium mayinclude transmission media or signals such as electrical,electromagnetic, or digital signals, conveyed via a communication mediumsuch as a network and/or a wireless link, such as may be implemented vianetwork interface 1840.

FIG. 19 illustrates a logical arrangement of a set of general componentsof an example computing device 1900 such as a web services provider,etc. Generally, a computing device 1900 can also be referred to as anelectronic device. The techniques shown in the figures and describedherein can be implemented using code and data stored and executed on oneor more electronic devices (e.g., a client end station and/or server endstation). Such electronic devices store and communicate (internallyand/or with other electronic devices over a network) code and data usingcomputer-readable media, such as non-transitory computer-readablestorage media (e.g., magnetic disks, optical disks, Random Access Memory(RAM), Read Only Memory (ROM), flash memory devices, phase-changememory) and transitory computer-readable communication media (e.g.,electrical, optical, acoustical or other form of propagated signals,such as carrier waves, infrared signals, digital signals). In addition,such electronic devices include hardware, such as a set of one or moreprocessors 1902 (e.g., wherein a processor is a microprocessor,controller, microcontroller, central processing unit, digital signalprocessor, application specific integrated circuit, field programmablegate array, other electronic circuitry, a combination of one or more ofthe preceding) coupled to one or more other components, e.g., one ormore non-transitory machine-readable storage media (e.g., memory 1904)to store code (e.g., instructions 1914) and/or data, and a set of one ormore wired or wireless network interfaces 1908 allowing the electronicdevice to transmit data to and receive data from other computingdevices, typically across one or more networks (e.g., Local AreaNetworks (LANs), the Internet). The coupling of the set of processorsand other components is typically through one or more interconnectswithin the electronic device, (e.g., busses and possibly bridges). Thus,the non-transitory machine-readable storage media (e.g., memory 1904) ofa given electronic device typically stores code (e.g., instructions1914) for execution on the set of one or more processors 1902 of thatelectronic device. One or more parts of various embodiments may beimplemented using different combinations of software, firmware, and/orhardware.

A computing device 1900 can include some type of display element 1906,such as a touch screen or liquid crystal display (LCD), although manydevices such as portable media players might convey information viaother means, such as through audio speakers, and other types of devicessuch as server end stations may not have a display element 1906 at all.As discussed, some computing devices used in some embodiments include atleast one input and/or output component(s) 1912 able to receive inputfrom a user. This input component can include, for example, a pushbutton, touch pad, touch screen, wheel, joystick, keyboard, mouse,keypad, or any other such device or element whereby a user is able toinput a command to the device. In some embodiments, however, such adevice might be controlled through a combination of visual and/or audiocommands and utilize a microphone, camera, sensor, etc., such that auser can control the device without having to be in physical contactwith the device.

As discussed, different approaches can be implemented in variousenvironments in accordance with the described embodiments. For example,FIG. 20 illustrates an example of an environment 2000 for implementingaspects in accordance with various embodiments. For example, in someembodiments requests are HyperText Transfer Protocol (HTTP) requeststhat are received by a web server (e.g., web server 2006), and theusers, via electronic devices, may interact with the provider networkvia a web portal provided via the web server 2006 and application server2008. As will be appreciated, although a web-based environment is usedfor purposes of explanation, different environments may be used, asappropriate, to implement various embodiments. The system includes anelectronic client device 2002, which may also be referred to as a clientdevice and can be any appropriate device operable to send and receiverequests, messages or information over an appropriate network 2004 andconvey information back to a user of the device 2002. Examples of suchclient devices include personal computers (PCs), cell phones, handheldmessaging devices, laptop computers, set-top boxes, personal dataassistants, electronic book readers, wearable electronic devices (e.g.,glasses, wristbands, monitors), and the like. The one or more networks2004 can include any appropriate network, including an intranet, theInternet, a cellular network, a local area network, or any other suchnetwork or combination thereof. Components used for such a system candepend at least in part upon the type of network and/or environmentselected. Protocols and components for communicating via such a networkare well known and will not be discussed herein in detail. Communicationover the network can be enabled via wired or wireless connections andcombinations thereof. In this example, the network 2004 includes theInternet, as the environment includes a web server 2006 for receivingrequests and serving content in response thereto, although for othernetworks an alternative device serving a similar purpose could be used,as would be apparent to one of ordinary skill in the art.

The illustrative environment includes at least one application server2008 and a data store 2010. It should be understood that there can beseveral application servers, layers, or other elements, processes orcomponents, which may be chained or otherwise configured, which caninteract to perform tasks such as obtaining data from an appropriatedata store. As used herein the term “data store” refers to any device orcombination of devices capable of storing, accessing and retrievingdata, which may include any combination and number of data servers,databases, data storage devices and data storage media, in any standard,distributed or clustered environment. The application server 2008 caninclude any appropriate hardware and software for integrating with thedata store 2010 as needed to execute aspects of one or more applicationsfor the client device 2002 and handling a majority of the data accessand business logic for an application. The application server 2008provides access control services in cooperation with the data store 2010and is able to generate content such as text, graphics, audio, video,etc., to be transferred to the client device 2002, which may be servedto the user by the web server in the form of HyperText Markup Language(HTML), Extensible Markup Language (XML), JavaScript Object Notation(JSON), or another appropriate unstructured or structured language inthis example. The handling of all requests and responses, as well as thedelivery of content between the client device 2002 and the applicationserver 2008, can be handled by the web server 2006. It should beunderstood that the web server 2006 and application server 2008 are notrequired and are merely example components, as structured code discussedherein can be executed on any appropriate device or host machine asdiscussed elsewhere herein.

The data store 2010 can include several separate data tables, databases,or other data storage mechanisms and media for storing data relating toa particular aspect. For example, the data store illustrated includesmechanisms for storing production data 2012 and user information 2016,which can be used to serve content for the production side. The datastore 2010 also is shown to include a mechanism for storing log orsession data 2014. It should be understood that there can be many otheraspects that may need to be stored in the data store, such as page imageinformation and access rights information, which can be stored in any ofthe above listed mechanisms as appropriate or in additional mechanismsin the data store 2010. The data store 2010 is operable, through logicassociated therewith, to receive instructions from the applicationserver 2008 and obtain, update, or otherwise process data in responsethereto. In one example, a user might submit a search request for acertain type of item. In this case, the data store 2010 might access theuser information 2016 to verify the identity of the user and can accessa production data 2012 to obtain information about items of that type.The information can then be returned to the user, such as in a listingof results on a web page that the user is able to view via a browser onthe user device 2002. Information for a particular item of interest canbe viewed in a dedicated page or window of the browser.

The web server 2006, application server 2008, and/or data store 2010 maybe implemented by one or more electronic devices 2020, which can also bereferred to as electronic server devices or server end stations, and mayor may not be located in different geographic locations. Each of the oneor more electronic devices 2020 may include an operating system thatprovides executable program instructions for the general administrationand operation of that device and typically will includecomputer-readable medium storing instructions that, when executed by aprocessor of the device, allow the device to perform its intendedfunctions. Suitable implementations for the operating system and generalfunctionality of the devices are known or commercially available and arereadily implemented by persons having ordinary skill in the art,particularly in light of the disclosure herein.

The environment in one embodiment is a distributed computing environmentutilizing several computer systems and components that areinterconnected via communication links, using one or more computernetworks or direct connections. However, it will be appreciated by thoseof ordinary skill in the art that such a system could operate equallywell in a system having fewer or a greater number of components than areillustrated in FIG. 20 . Thus, the depiction of the environment 2000 inFIG. 20 should be taken as being illustrative in nature and not limitingto the scope of the disclosure.

Various embodiments discussed or suggested herein can be implemented ina wide variety of operating environments, which in some cases caninclude one or more user computers, computing devices, or processingdevices which can be used to operate any of a number of applications.User or client devices can include any of a number of general purposepersonal computers, such as desktop or laptop computers running astandard operating system, as well as cellular, wireless, and handhelddevices running mobile software and capable of supporting a number ofnetworking and messaging protocols. Such a system also can include anumber of workstations running any of a variety ofcommercially-available operating systems and other known applicationsfor purposes such as development and database management. These devicesalso can include other electronic devices, such as dummy terminals,thin-clients, gaming systems, and/or other devices capable ofcommunicating via a network.

Most embodiments utilize at least one network that would be familiar tothose skilled in the art for supporting communications using any of avariety of commercially-available protocols, such as TransmissionControl Protocol/Internet Protocol (TCP/IP), File Transfer Protocol(FTP), Universal Plug and Play (UPnP), Network File System (NFS), CommonInternet File System (CIFS), Extensible Messaging and Presence Protocol(XMPP), AppleTalk, etc. The network(s) can include, for example, a localarea network (LAN), a wide-area network (WAN), a virtual private network(VPN), the Internet, an intranet, an extranet, a public switchedtelephone network (PSTN), an infrared network, a wireless network, andany combination thereof.

In embodiments utilizing a web server, the web server can run any of avariety of server or mid-tier applications, including HTTP servers, FileTransfer Protocol (FTP) servers, Common Gateway Interface (CGI) servers,data servers, Java servers, business application servers, etc. Theserver(s) also may be capable of executing programs or scripts inresponse requests from user devices, such as by executing one or moreWeb applications that may be implemented as one or more scripts orprograms written in any programming language, such as Java®, C, C# orC++, or any scripting language, such as Perl, Python, PHP, or TCL, aswell as combinations thereof. The server(s) may also include databaseservers, including without limitation those commercially available fromOracle®, Microsoft®, Sybase®, IBM®, etc. The database servers may berelational or non-relational (e.g., “NoSQL”), distributed ornon-distributed, etc.

The environment can include a variety of data stores and other memoryand storage media as discussed above. These can reside in a variety oflocations, such as on a storage medium local to (and/or resident in) oneor more of the computers or remote from any or all of the computersacross the network. In a particular set of embodiments, the informationmay reside in a storage-area network (SAN) familiar to those skilled inthe art. Similarly, any necessary files for performing the functionsattributed to the computers, servers, or other network devices may bestored locally and/or remotely, as appropriate. Where a system includescomputerized devices, each such device can include hardware elementsthat may be electrically coupled via a bus, the elements including, forexample, at least one central processing unit (CPU), at least one inputdevice (e.g., a mouse, keyboard, controller, touch screen, or keypad),and/or at least one output device (e.g., a display device, printer, orspeaker). Such a system may also include one or more storage devices,such as disk drives, optical storage devices, and solid-state storagedevices such as random-access memory (RAM) or read-only memory (ROM), aswell as removable media devices, memory cards, flash cards, etc.

Such devices also can include a computer-readable storage media reader,a communications device (e.g., a modem, a network card (wireless orwired), an infrared communication device, etc.), and working memory asdescribed above. The computer-readable storage media reader can beconnected with, or configured to receive, a computer-readable storagemedium, representing remote, local, fixed, and/or removable storagedevices as well as storage media for temporarily and/or more permanentlycontaining, storing, transmitting, and retrieving computer-readableinformation. The system and various devices also typically will includea number of software applications, modules, services, or other elementslocated within at least one working memory device, including anoperating system and application programs, such as a client applicationor web browser. It should be appreciated that alternate embodiments mayhave numerous variations from that described above. For example,customized hardware might also be used and/or particular elements mightbe implemented in hardware, software (including portable software, suchas applets), or both. Further, connection to other computing devicessuch as network input/output devices may be employed.

Storage media and computer readable media for containing code, orportions of code, can include any appropriate media known or used in theart, including storage media and communication media, such as but notlimited to volatile and non-volatile, removable and non-removable mediaimplemented in any method or technology for storage and/or transmissionof information such as computer readable instructions, data structures,program modules, or other data, including RAM, ROM, ElectricallyErasable Programmable Read-Only Memory (EEPROM), flash memory or othermemory technology, Compact Disc-Read Only Memory (CD-ROM), DigitalVersatile Disk (DVD) or other optical storage, magnetic cassettes,magnetic tape, magnetic disk storage or other magnetic storage devices,or any other medium which can be used to store the desired informationand which can be accessed by a system device. Based on the disclosureand teachings provided herein, a person of ordinary skill in the artwill appreciate other ways and/or methods to implement the variousembodiments.

In the preceding description, various embodiments are described. Forpurposes of explanation, specific configurations and details are setforth in order to provide a thorough understanding of the embodiments.However, it will also be apparent to one skilled in the art that theembodiments may be practiced without the specific details. Furthermore,well-known features may be omitted or simplified in order not to obscurethe embodiment being described.

Bracketed text and blocks with dashed borders (e.g., large dashes, smalldashes, dot-dash, and dots) are used herein to illustrate optionaloperations that add additional features to some embodiments. However,such notation should not be taken to mean that these are the onlyoptions or optional operations, and/or that blocks with solid bordersare not optional in certain embodiments.

Reference numerals with suffix letters may be used to indicate thatthere can be one or multiple instances of the referenced entity invarious embodiments, and when there are multiple instances, each doesnot need to be identical but may instead share some general traits oract in common ways. Further, the particular suffixes used are not meantto imply that a particular amount of the entity exists unlessspecifically indicated to the contrary. Thus, two entities using thesame or different suffix letters may or may not have the same number ofinstances in various embodiments.

References to “one embodiment,” “an embodiment,” “an exampleembodiment,” etc., indicate that the embodiment described may include aparticular feature, structure, or characteristic, but every embodimentmay not necessarily include the particular feature, structure, orcharacteristic. Moreover, such phrases are not necessarily referring tothe same embodiment. Further, when a particular feature, structure, orcharacteristic is described in connection with an embodiment, it issubmitted that it is within the knowledge of one skilled in the art toaffect such feature, structure, or characteristic in connection withother embodiments whether or not explicitly described.

Moreover, in the various embodiments described above, unlessspecifically noted otherwise, disjunctive language such as the phrase“at least one of A, B, or C” is intended to be understood to mean eitherA, B, or C, or any combination thereof (e.g., A, B, and/or C). As such,disjunctive language is not intended to, nor should it be understood to,imply that a given embodiment requires at least one of A, at least oneof B, or at least one of C to each be present.

Exemplary embodiments include, but are not limited to the following.

Example 1

A computer-implemented method, comprising: receiving, in a multi-tenantweb services provider, an application instance configuration, anapplication of the application instance to utilize a portion of anattached graphics processing unit (GPU) during execution of a machinelearning model and the application instance configuration including: anindication of the central processing unit (CPU) capability to be used,an arithmetic precision of the machine learning model to be used, anindication of the GPU capability to be used, a storage location of theapplication, and an indication of an amount of random access memory touse; provisioning the application instance and the portion of the GPUattached to the application instance, wherein the application instanceis implemented using a physical compute instance in a first instancelocation, wherein the portion of the GPU is implemented using a physicalGPU in the second location, and wherein the physical GPU is accessibleto the physical compute instance over a network; attaching the portionof the GPU to the application instance; loading the machine learningmodel onto the attached portion of the GPU; and performing inferenceusing the loaded machine learning model of the application using theportion of the GPU on the attached GPU.

Example 2

The method of example 1, wherein the application instance and theportion of the attached GPU are within different virtual networks.

Example 3

The method of example 1, wherein the machine learning model includes adescription of a computation graph for inference and weights obtainedfrom training.

Example 4

The method of example 1, wherein the machine learning model is inTensorFlow, MXNet, or ONNX format.

Example 5

A computer-implemented method, comprising: receiving, in a multi-tenantweb services provider, an application instance configuration, anapplication of the application instance to utilize a portion of anattached accelerator during execution of a machine learning model andthe application instance configuration including: an indication of thecentral processing unit (CPU) capability to be used, an arithmeticprecision of the machine learning model to be used, an indication of theaccelerator capability to be used, a storage location of theapplication, and an indication of an amount of random access memory touse; provisioning the application instance and the portion of theaccelerator attached to the application instance, wherein theapplication instance is implemented using a physical compute instance ina first instance location, wherein the portion of the accelerator isimplemented using a physical accelerator in the second location, andwherein the physical accelerator is accessible to the physical computeinstance over a network; attaching the portion of the accelerator to theapplication instance; loading the machine learning model onto theattached portion of the accelerator; and performing inference using theloaded machine learning model of the application using the portion ofthe accelerator on the attached accelerator.

Example 6

The method of example 5, wherein the machine learning model includes adescription of a computation graph for inference and weights obtainedfrom training.

Example 7

The method of example 5, wherein the machine learning model is in aTensorFlow, MXNet, or ONNX format.

Example 8

The method of example 5, wherein the application instance and theportion of the attached accelerator are within different virtualnetworks.

Example 9

The method of example 5, wherein the accelerator is one of a pluralityof accelerators of an accelerator appliance.

Example 10

The method of example 9, wherein the accelerator appliance includesaccelerators of different capabilities.

Example 11

The method of example 10, wherein a central processing unit of theaccelerator appliance is shared proportional to capabilities of theplurality of accelerators.

Example 12

The method of example 5, further comprising: deattaching the portion ofan attached accelerator; and migrating the machine learning model to adifferent portion of the attached accelerator.

Example 13

The method of example 5, further comprising: deattaching the portion ofan attached accelerator; and migrating the machine learning model to aportion of a different accelerator.

Example 14

The method of example 11, further comprising: prior performing inferenceusing the loaded machine learning model of the application using theportion of the accelerator on the attached accelerator, determining aninference engine to use based on the loaded machine learning model.

Example 15

The method of example 14, wherein the inference engine is compatiblewith the version number of the machine learning model format.

Example 16

A system comprising: storage to store an application, the applicationincluding a machine learning model; and an elastic inference serviceimplemented by a second one or more electronic devices, the elasticinference service including an application instance and an acceleratorappliance, the elastic inference service to: receive a configuration forthe application instance, the application of the application instance toutilize a portion of an attached accelerator of the acceleratorappliance during execution of the machine learning model and theapplication instance configuration including: an indication of thecentral processing unit (CPU) capability to be used, an arithmeticprecision of the machine learning model to be used, an indication of theaccelerator capability to be used, a storage location of theapplication, and an indication of an amount of random access memory touse; provision the application instance and the portion of theaccelerator attached to the application instance, wherein theapplication instance is implemented using a physical compute instance ina first instance location, wherein the portion of the accelerator isimplemented using a physical accelerator in the second location, andwherein the physical accelerator is accessible to the physical computeinstance over a network; attach the portion of the accelerator to theapplication instance; load the machine learning model onto the attachedportion of the accelerator; and perform inference using the loadedmachine learning model of the application using the portion of theaccelerator on the attached accelerator.

Example 17

The system of example 16, wherein the elastic inference service is todeattach the portion of an attached accelerator and migrate the machinelearning model to a different portion of the attached accelerator.

Example 18

The system of example 16, wherein the elastic inference service is todeattach the portion of an attached accelerator and migrate the machinelearning model to a different accelerator.

Example 19

The system of example 16, wherein the machine learning model includes adescription of a computation graph for inference and weights obtainedfrom training.

Example 20

The system of example 16, wherein the machine learning model is in aTensorFlow, MXNet, or ONNX format.

Example 21

A computer-implemented method, comprising: attaching a first set of oneor more graphical processing unit (GPU) slots of an acceleratorappliance to an application instance of a multi-tenant provider networkaccording to an application instance configuration, the applicationinstance configuration to define per GPU slot capabilities to be used byan application of the application instance, wherein the multi-tenantprovider network comprises a plurality of computing devices configuredto implement a plurality of virtual compute instances, and wherein thefirst set of one or more GPU slots is implemented using physical GPUresources accessible to the application instance over a network; loadingthe machine learning model onto the first set of one or more GPU slots;and while performing inference using the loaded machine learning modelof the application using the first set of one or more GPU slots on theattached accelerator appliance, managing resources of the acceleratorappliance using an accelerator appliance manager of the acceleratorappliance.

Example 22

The method of example 21, wherein the accelerator appliance includes atleast on GPU and at least one other type of accelerator.

Example 23

The method of example 21, further comprising: while attaching a set ofone or more GPU slots of the accelerator appliance to an applicationinstance, updating at least one software version used by the GPU slot tobe compatible with the machine learning model.

Example 24

The method of example 21, further comprising: replacing the first set ofone or more GPU slots with a second set of one or more GPU slots for theapplication instance; migrating processing for the application instancefrom the first set of one or more GPU slots to the second set of one ormore GPU slots; and executing an application using the second set of oneor more GPU slots.

Example 25

A computer-implemented method, comprising: attaching a first set of oneor more accelerator slots of an accelerator appliance to an applicationinstance of a multi-tenant provider network according to an applicationinstance configuration, the application instance configuration to defineper accelerator slot capabilities to be used by an application of theapplication instance, wherein the multi-tenant provider networkcomprises a plurality of computing devices configured to implement aplurality of virtual compute instances, and wherein the first set of oneor more accelerator slots is implemented using physical acceleratorresources accessible to the application instance; loading the machinelearning model onto the first set of one or more accelerator slots; andwhile performing inference using the loaded machine learning model ofthe application using the first set of one or more accelerator slots onthe attached accelerator appliance, managing resources of theaccelerator appliance using an accelerator appliance manager of theaccelerator appliance.

Example 26

The method of example 25, wherein managing resources of the acceleratorappliance includes managing a central processing unit, memory, andingress network bandwidth.

Example 27

The method of example 25, wherein managing resources of the acceleratorappliance includes spatially multiplexing one or more accelerator slots.

Example 28

The method of example 25, wherein managing resources of the acceleratorappliance includes temporally multiplexing a tensor processing blockinto a single accelerator slot.

Example 29

The method of example 25, further comprising: updating at least onesoftware version used by the accelerator slot.

Example 30

The method of example 25, further comprising: replacing the first set ofone or more accelerator slots with a second set of one or moreaccelerator slots for the application instance; migrating processing forthe application instance from the first set of one or more acceleratorslots to the second set of one or more accelerator slots; and executingthe application using the second set of one or more accelerator slots.

Example 31

The method of example 30, wherein the first set of one or moreaccelerator slots are replaced with the second set of one or moreaccelerator slots for the application instance due to a change inrequirements.

Example 32

The method of example 31, wherein the change in requirements isspecified by a user of the application instance.

Example 33

The method of example 30, wherein the first set of one or moreaccelerator slots are replaced with the second set of one or moreaccelerator slots for the application instance due to a degradation ofperformance.

Example 34

The method of example 30, wherein the second set of one or moreaccelerator slots provides a different level of processing relative tothe first set of one or more accelerator slots.

Example 35

The method of example 30, wherein replacing the first set of one or moreaccelerator slots with the second set of one or more accelerator slotscomprises causing the second set of one more accelerator slots to assumeoperation in place of the first set of one more accelerator slots.

Example 36

The method of example 25, wherein the accelerator appliance includesaccelerators of different capabilities.

Example 37

A system comprising: storage to store an application, the applicationincluding a machine learning model; and an elastic inference serviceimplemented by a second one or more electronic devices, the elasticinference service including an application instance and an acceleratorappliance, the elastic inference service to: attach a first set of oneor more accelerator slots of the accelerator appliance to theapplication instance of a multi-tenant provider network according to anapplication instance configuration, the application instanceconfiguration to define per accelerator slot capabilities to be used byan application of the application instance, wherein the multi-tenantprovider network comprises a plurality of computing devices configuredto implement a plurality of virtual compute instances, and wherein thefirst set of one or more accelerator slots is implemented using physicalaccelerator resources accessible to the application instance; load themachine learning model onto the first set of one or more acceleratorslots; and while performing inference using the loaded machine learningmodel of the application using the first set of one or more acceleratorslots on the attached accelerator appliance, manage resources of theaccelerator appliance using an accelerator appliance manager of theaccelerator appliance.

Example 38

The system of example 37, wherein to manage resources of the acceleratorappliance is to include to manage a central processing unit, memory, andingress network bandwidth.

Example 39

The system of example 37, wherein the elastic inference service isfurther to: replace the first set of one or more accelerator slots witha second set of one or more accelerator slots for the applicationinstance, migrate processing for the application instance from the firstset of one or more accelerator slots to the second set of one or moreaccelerator slots, and executing the application using the second set ofone or more accelerator slots.

Example 40

The system of example 39, wherein the first set of one or moreaccelerator slots are replaced with the second set of one or moreaccelerator slots for the application instance due to a degradation ofperformance.

Example 41

A computer-implemented method, comprising: receiving, in a multi-tenantweb services provider, an application instance configuration, anapplication of the application instance to utilize a portion of anattached graphics processing unit (GPU) during execution of a machinelearning model and the application instance configuration including anarithmetic precision of the machine learning model to be used indetermining the portion of the GPU to provision; provisioning theapplication instance and the portion of the GPU attached to theapplication instance, wherein the application instance is implementedusing a physical compute instance in a first instance location, whereinthe portion of the GPU is implemented using a physical GPU in the secondlocation, and wherein the physical GPU is accessible to the physicalcompute instance over a network; loading the machine learning model ontothe portion of the GPU; and performing inference using the loadedmachine learning model of the application using the portion of the GPUon the attached GPU.

Example 42

The method of example 41, further comprising: prior to provisioning theportion of the accelerator, evaluating the machine learning model todetermine the arithmetic precision of the machine learning model.

Example 43

The method of example 41, further comprising: profiling the machinelearning model by converting to an intermediate representation havingGPU -independent optimization and converting from the intermediaterepresentation to machine code with GPU -dependent optimizations.

Example 44

The method of example 41, further comprising: selecting a GPU locationfor a physical accelerator or an application instance location based atleast in part on one or more placement criteria, wherein themulti-tenant web services provider comprises a plurality of instancelocations for physical compute instances and a plurality of GPUlocations for physical accelerators.

Example 45

A computer-implemented method, comprising: receiving, in a multi-tenantweb services provider, an application instance configuration, anapplication of the application instance to utilize a portion of anattached accelerator during execution of a machine learning model andthe application instance configuration including an arithmetic precisionof the machine learning model to be used in determining the portion ofthe accelerator to provision; provisioning the application instance andthe portion of the accelerator attached to the application instance,wherein the application instance is implemented using a physical computeinstance in a first location, wherein the portion of the accelerator isimplemented using a physical accelerator in the second location, andwherein the physical accelerator is accessible to the physical computeinstance; loading the machine learning model onto the portion of theaccelerator; and performing inference using the loaded machine learningmodel of the application using the portion of the accelerator on theattached accelerator.

Example 46

The method of example 45, wherein the machine learning model includes adescription of a computation graph for inference and weights obtainedfrom training.

Example 47

The method of example 45, further comprising: prior to provisioning theportion of the accelerator, evaluating the machine learning model todetermine the arithmetic precision of the machine learning model.

Example 48

The method of example 45, further comprising: profiling the machinelearning model by converting to an intermediate representation havingaccelerator-independent optimization and converting from theintermediate representation to machine code with accelerator -dependentoptimizations.

Example 49

The method of example 45, further comprising: in the application,aggregating calls to the portion of the accelerator and sending theaggregated calls as a batch.

Example 50

The method of example 45, further comprising: prior to attaching theaccelerator, selecting the accelerator based on computational capabilityof the accelerator.

Example 51

The method of example 45, further comprising: selecting an acceleratorlocation for a physical accelerator or an application instance locationbased at least in part on one or more placement criteria, wherein themulti-tenant web services provider comprises a plurality of instancelocations for physical compute instances and a plurality of acceleratorlocations for physical accelerators.

Example 52

The method of example 41, wherein the one or more placement criteriacomprise improvement of one or more metrics.

Example 53

The method of example 51, wherein the one or more placement criteria arebased at least in part on a performance metric associated with use ofthe physical accelerator by the physical compute instance.

Example 54

The method of example 51, wherein the one or more placement criteria arebased at least in part on an energy metric associated with use of thephysical accelerator by the physical compute instance.

Example 55

The method of example 51, wherein the accelerator location or theapplication instance location is selected based at least in part onnetwork locality.

Example 56

The method of example 51, wherein the accelerator location is selectedbased at least in part on network latency between the physicalaccelerator and a client device.

Example 57

A system comprising: storage to store an application, the applicationincluding a machine learning model; and an elastic inference serviceimplemented by a second one or more electronic devices, the elasticinference service including an application instance and an acceleratorappliance, the elastic inference service to: receive, in a multi-tenantweb services provider, an application instance configuration, anapplication of the application instance to utilize a portion of anattached accelerator during execution of a machine learning model andthe application instance configuration including an arithmetic precisionof the machine learning model to be used in determining the portion ofthe accelerator to provision; provision the application instance and theportion of the accelerator attached to the application instance, whereinthe application instance is implemented using a physical computeinstance in a first location, wherein the portion of the accelerator isimplemented using a physical accelerator in the second location, andwherein the physical accelerator is accessible to the physical computeinstance; load the machine learning model onto the portion of theaccelerator; and perform inference using the loaded machine learningmodel of the application using the portion of the accelerator on theattached accelerator.

Example 58

The system of example 57, wherein the elastic inference service is toprofile the machine learning model by converting to an intermediaterepresentation having accelerator-independent optimization andconverting from the intermediate representation to machine code withaccelerator -dependent optimizations.

Example 59

The system of example 57, wherein the elastic inference service is toselect an accelerator location for a physical accelerator or anapplication instance location based at least in part on one or moreplacement criteria, wherein the multi-tenant web services providercomprises a plurality of instance locations for physical computeinstances and a plurality of accelerator locations for physicalaccelerators.

Example 60

The system of example 57, wherein the elastic inference service is tothe accelerator location or the application instance location isselected based at least in part on network locality.

Example 61

A computer-implemented method, comprising: receiving, in a multi-tenantweb services provider, an application instance configuration, anapplication of the application instance to utilize a plurality ofportions of at least one attached graphics processing unit (GPU) duringexecution of a machine learning model; provisioning the applicationinstance and the portions of the at least one GPU attached to theapplication instance; loading the machine learning model onto theportions of the at least one GPU; receiving scoring data in theapplication; and utilizing each of the portions of the attached at leastone GPU to perform inference on the scoring data in parallel and onlyusing one response from the portions of the GPU.

Example 62

The method of example 61, wherein the one response to use is atemporally first response.

Example 63

The method of example 61, further comprising: tracking timing of each ofresponse from the portions of the attached at least one GPU; andaltering the provisioning of the plurality of portions of at least oneGPU based on the tracked timing.

Example 64

A computer-implemented method, comprising: provisioning an applicationinstance and portions of at least one accelerator attached to theapplication instance to execute a machine learning model of anapplication of the application instance; loading the machine learningmodel onto the portions of the at least one accelerator; receivingscoring data in the application; and utilizing each of the portions ofthe attached at least one accelerator to perform inference on thescoring data in parallel and only using one response from the portionsof the accelerator.

Example 65

The method of example 64, wherein the machine learning model includes adescription of a computation graph for inference and weights obtainedfrom training.

Example 66

The method of example 64, wherein the one response to use is atemporally first response.

Example 67

The method of example 64, further comprising: tracking timing of each ofresponse from the portions of the attached at least one accelerator; andaltering the provisioning of the plurality of portions of at least oneaccelerator based on the tracked timing.

Example 68

The method of example 64, wherein the altering the provisioning of theplurality of portions of at least one accelerator based on the trackedtiming is performed, at least in part, by launching at least onedifferent accelerator slot and terminating an underperformingaccelerator slot.

Example 69

The method of example 64, further comprising: receiving an applicationinstance configuration, the application instance configuration toindicate the use of altering the provisioning of the plurality ofportions of at least one accelerator based on the tracked timing.

Example 70

The method of example 64, further comprising: prior to attaching theaccelerator, selecting the accelerator based on computational capabilityof the accelerator.

Example 71

The method of example 64, further comprising: selecting an acceleratorlocation for a physical accelerator or an application instance locationbased at least in part on one or more placement criteria, wherein themulti-tenant web services provider comprises a plurality of instancelocations for physical compute instances and a plurality of acceleratorlocations for physical accelerators;

Example 72

The method of example 71, wherein the one or more placement criteria arebased at least in part on a performance metric associated with use ofthe physical accelerator by the physical compute instance.

Example 73

The method of example 71, wherein the accelerator location or theapplication instance location is selected based at least in part onnetwork locality.

Example 74

The method of example 71, wherein the accelerator location is selectedbased at least in part on network latency between the physicalaccelerator and a client device.

Example 75

A system comprising: storage to store an application, the applicationincluding a machine learning model; and an elastic inference serviceimplemented by a second one or more electronic devices, the elasticinference service including an application instance and an acceleratorappliance, the elastic inference service to: provision an applicationinstance and portions of at least one accelerator attached to theapplication instance to execute a machine learning model of anapplication of the application instance; load the machine learning modelonto the portions of the at least one accelerator; receive scoring datain the application; and utilize each of the portions of the attached atleast one accelerator to perform inference on the scoring data inparallel and only using one response from the portions of theaccelerator.

Example 76

The system of example 75, wherein the one response to use is atemporally first response.

Example 77

The system of example 75, wherein the elastic inference service isfurther to track timing of each of response from the portions of theattached at least one accelerator and altering the provisioning of theplurality of portions of at least one accelerator based on the trackedtiming.

Example 78

The system of example 76, wherein the altering of the provisioning ofthe plurality of portions of at least one accelerator based on thetracked timing is performed, at least in part, by launching at least onedifferent accelerator slot and terminating an underperformingaccelerator slot.

Example 79

The system of example 75, wherein the elastic inference service isfurther to receive an application instance configuration, theapplication instance configuration to indicate the use of altering theprovisioning of the plurality of portions of at least one acceleratorbased on the tracked timing.

Example 80

The system of example 75, wherein the elastic inference service isfurther to, prior to attaching the accelerator, select the acceleratorbased on computational capability of the accelerator.

The specification and drawings are, accordingly, to be regarded in anillustrative rather than a restrictive sense. It will, however, beevident that various modifications and changes may be made thereuntowithout departing from the broader spirit and scope of the disclosure asset forth in the claims.

We claim:
 1. A computer-implemented method, comprising: receiving, in amulti-tenant web services provider, an application instanceconfiguration, an application of the application instance to utilize aportion of an accelerator, having a plurality of accelerator slots,during execution of a machine learning model, the application instanceconfiguration including: an indication of a central processing unit(CPU) capability to be used, an arithmetic precision of the machinelearning model to be used, an indication of an accelerator capability tobe used, a storage location of the application, and an indication of anamount of random access memory to use; based on the received applicationinstance configuration, provisioning the application instance, whereinprovisioning includes: provisioning a physical compute instanceincluding a configuration of a CPU, memory, storage, and networkingcapacity to execute the application in a first location; provisioning anaccelerator appliance including a configuration of a CPU, memory,storage, and networking capacity to execute a machine learning model ofthe application in a second location, wherein the accelerator appliancecomprises one or more physical accelerators; and provisioning theplurality of accelerator slots of the accelerator appliance, wherein theapplication instance is implemented using the physical compute instance,wherein each accelerator slot is implemented using one of the physicalaccelerators, and wherein the one or more physical accelerators isaccessible to the physical compute instance over a network; attachingthe plurality of accelerator slots to the application instance; loadingthe machine learning model onto the attached plurality of acceleratorslots; and performing inference using the loaded machine learning modelof the application using the attached plurality of accelerator slots,by: receiving an inference request by the application instance;transmitting inference request data to the attached plurality ofaccelerator slots; receiving and using in the application an initialresponse from one of the attached plurality of accelerator slots;processing subsequent responses that are received by discarding one ormore of the subsequent responses; and tracking timing of the responsesto determine if migration in any attached accelerator slot from theattached plurality of accelerator slots should occur, wherein: if atiming of one or more responses is greater than a threshold, performinga migration to a different accelerator slot from the attached pluralityof accelerator slots, wherein the migration includes replacing one ormore underperforming accelerator slots with new one or more acceleratorslots to assume operation in place of the replaced one or moreaccelerator slots, and if a timing of one or more responses is less thanor equal to a threshold, not perform a migration.
 2. The method of claim1, wherein the machine learning model includes a description of acomputation graph for inference and weights obtained from training. 3.The method of claim 1, wherein components of each accelerator slot areisolated in terms of resources including CPU, RAM, GPU compute, GPUmemory, disk, and network.
 4. The method of claim 1, wherein theapplication instance and the one or more physical accelerators arewithin different virtual networks.
 5. The method of claim 1, wherein theaccelerator appliance includes a plurality of accelerators of differentcapabilities.
 6. The method of claim 5, wherein a central processingunit of the accelerator appliance is shared proportional to capabilitiesof the plurality of accelerators.
 7. The method of claim 1, furthercomprising: detaching a portion of the one or more physicalaccelerators; and migrating the machine learning model to a differentportion of the one or more physical accelerators.
 8. The method of claim1, further comprising: detaching a portion of the one or more physicalaccelerators; and migrating the machine learning model to a portion of adifferent accelerator.
 9. The method of claim 6, further comprising:prior to performing inference using the loaded machine learning model ofthe application using the attached plurality of accelerator slots,determining an inference engine to use based on the loaded machinelearning model.
 10. The method of claim 9, wherein the inference engineis compatible with a version number of a format of the machine learningmodel.
 11. A system comprising: storage to store an application, theapplication including a machine learning model; and an elastic inferenceservice implemented by one or more electronic devices, the elasticinference service including an application instance and an acceleratorappliance, the elastic inference service to: receive a configuration forthe application instance, the application of the application instance toutilize a portion of an accelerator of the accelerator appliance, theaccelerator including a plurality of accelerator slots during executionof the machine learning model, the application instance configurationincluding: an indication of a central processing unit (CPU) capabilityto be used, an arithmetic precision of the machine learning model to beused, an indication of an accelerator capability to be used, a storagelocation of the application, and an indication of an amount of randomaccess memory to use; based on the received configuration for theapplication instance, provision the application instance, whereinprovisioning includes: provisioning a physical compute instanceincluding a configuration of a CPU, memory, storage, and networkingcapacity to execute the application in a first location; provisioning anaccelerator appliance including a configuration of a CPU, memory,storage, and networking capacity to execute a machine learning model ofthe application in a second location, wherein the accelerator appliancecomprises one or more physical accelerators; and provisioning theplurality of accelerator slots of the accelerator appliance, wherein theapplication instance is implemented using the physical compute instance,wherein each accelerator slot is implemented using the physicalaccelerators, and wherein the one or more physical accelerators isaccessible to the physical compute instance over a network; attach theplurality of accelerator slots to the application instance; load themachine learning model onto the attached plurality of accelerator slots;and perform inference using the loaded machine learning model of theapplication using the attached plurality of accelerator slots, by:receiving an inference request by the application instance; transmittinginference request data to the attached plurality of accelerator slots;receiving and using in the application an initial response from one ofthe attached plurality of accelerator slots; processing subsequentresponses that are received by discarding one or more of the subsequentresponses; and tracking timing of the responses to determine ifmigration in any attached accelerator slot from the attached pluralityof accelerator slots should occur, wherein: if a timing of one or moreresponses is greater than a threshold, performing a migration to adifferent accelerator slot from the attached plurality of acceleratorslots, wherein the migration includes replacing one or moreunderperforming accelerator slots with new one or more accelerator slotsto assume operation in place of the replaced one or more acceleratorslots, and if a timing of one or more responses is less than or equal toa threshold, not perform a migration.
 12. The system of claim 11,wherein the elastic inference service is to detach a portion of the oneor more physical accelerators and migrate the machine learning model toa different portion of the one or more physical accelerators.
 13. Thesystem of claim 11, wherein the elastic inference service is to detach aportion of the one or more physical accelerators and migrate the machinelearning model to a different accelerator.
 14. The system of claim 11,wherein the machine learning model includes a description of acomputation graph for inference and weights obtained from training. 15.The system of claim 11, wherein components of each accelerator slot areisolated in terms of resources including CPU, RAM, GPU compute, GPUmemory, disk, and network.
 16. The system of claim 11, wherein theapplication instance and the one or more physical accelerators arewithin different virtual networks.
 17. The system of claim 16, whereinthe accelerator appliance includes a plurality of accelerators ofdifferent capabilities.
 18. The system of claim 17, wherein a centralprocessing unit of the accelerator appliance is shared proportional tocapabilities of the plurality of accelerators.